Cosine and Mahalanobis distance

This PR implements Cosine and Mahalanobis distances.
I don't think we want this function in stat. Computing the angle between two vectors is a lot more fundamental than stat. Maybe in floats though, what do you think @kortschak . If it's in floats, we don't want the "1 - " that's there, and we probably actually want to compute the angle (rather than the cosine of the angle).