Use distutils to determine the compiled extension module extension.

The implementation details here are an abbreviated form of those used in [cythonmagic](https://github.com/ipython/ipython/blob/af2a22860a174940e11dfbcd37b42016cbce5b82/IPython/extensions/cythonmagic.py#L281).

Closes #1.