As for the listeners that were left behind by the failed uninstall, you will have to disable them manually from the XenForo CP section for CodeEventListeners. Then you would be able to undo your change to config.php
For future reference, if the upgrade fails during the "final" process, there is never any need to uninstall.