python packagisation: Move core implementation from __init__.py to core.py

This seems to be more standard in python projects -- __init__.py only
imports what it needs to define `__all__`.

It also allows `pylint` to detect "unused import" errors, and isort to
detect imports not sorted according to the PEP8 coding standards -- in
both cases skipping files named "__init__.py" seems to be hard-coded
into those tools.