Cosine and Mahalanobis distance

This PR implements Cosine and Mahalanobis distances.
> It should be an interface either way. If the user inputs a Diagonal matrix then the multiplication can be much cheaper (when mat64 gets more intelligent). If it's forced to be a Dense no such gains may be had.

Ok then, I will use this approach using interfaces.

>I don't think all distance functions should go in stat. Just the distance functions that are statistical in nature

I agree with this rationale, I just felt it might be a little harder to use distance functions from different packages.

> The Mahalanobis distance ... is a multi-dimensional generalization of the idea of measuring how many standard deviations away P is from the mean of D.

There are two interpretations as mentioned in the Wikipedia page. For your definition above which considers the distance of a point from the mean of distribution, I agree that this would better fit as a method under a multivariate gaussian type. For this implementation, I was thinking of the second interpretation of measuring the distance between two vectors from the same distribution with a known covariance matrix.