Added cython version of mtie_phase()

The numpy version of mtie_phase() was slower than the pure python version,
so I've added some cython code. It runs a little faster, but there's still
a lot of room for improvement.