Cleanup of Cython code

In addition to tidying up the files and splitting out 'core' functions, I implemented the Cython routine for the subpixel overlap which should speed things up. I haven't had a chance to run the before/after benchmarks yet.