python: move more logic from XBPython to CPythonInvoker

This commit moves some more logic from XBPython to the recently introduced CPythonInvoker and refactores some of the code into being more generic so that it will be possible to implement specialized CPythonInvoker derivates which use special/additional python modules etc. XBPython should now mostly contain logic that affects the overall handling of python and not a specific python interpreter instance.