Core: fixed py3k incompatibility

Also abstracted getting the list of objects that may register RMI
calls into a separate function.