Knn refactor

I noticed that whether the user picked "euclidean" or "manhattan", both switch statement were still calling -			pairwiseMetrics.NewEuclidean()

Fixed the bug and refactored the code to make it a bit shorter at the same time.