Refactor euclidean distance metric in Cython

Not a major performance gain, but timeit on 1000x3 feature set reports a speedup from 15ms to 10ms on my system.

Since this function is used quite a lot in scikit-learn it should speedup the whole package quite a bit.