Cosine and Mahalanobis distance

This PR implements Cosine and Mahalanobis distances.
> First of all, we don't want to introduce a dependence of stat on mat64. It's a lot of extra code to bring in.

I remember from a previous discussion that there was an idea to create a new package for distance computations. In that case do you think these functions along with KullbackLeibler, Bhattacharyya and the like would fit there? There are other useful functionalities such as pairwise distance matrices as well.

> Secondly, I don't think we want to ask people to give us C^-1

Sorry, I don't understand why this is bad, could you explain about this a little?

> Maybe in the future kernel package?

Btw, do you have any links to discussions about this package? A quick search didn't turn up any results, thanks.