Cosine and Mahalanobis distance

This PR implements Cosine and Mahalanobis distances.
Make this take an `interface{ Dims() (int, int); RowView(int) []float64 }` by some other name.