change to command pattern on similarity function

removed SimilarityFunction enum from KnnModel directory and pass
DistanceMetricMethod directly.