Rewrite of cov functions and matrix methods to tiedrank

This one fixes #2030 but it is also a rewrite of all the covariance methods. The new core algorithm is faster and should be more stable. I have removed the methods with user supplied mean as they were slower than the present solution.