Use load_ipython_extension to register magic

IPython watches for the `load_ipython_extension` function and injects the current ipython session when loading the module. This makes it so the `get_ipython` function doesn't need to be present in order to import the module (not that anyone is likely to import this outside of IPython).