Cosine and Mahalanobis distance

This PR implements Cosine and Mahalanobis distances.
Sorry, I don't think this belongs here either. 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. Secondly, I don't think we want to ask people to give us C^-1. If you have a covariance matrix (which is the normal case), it encourages users to compute C.Inv(), which is definitely a bad idea. A functionality of this sort belongs somewhere, but not here. Maybe in the future kernel package?