Added ManhattanDistance. Added test cases for distance algorithms.