ENH: add a weighted covariance calculation to numpy.function_base.

Weights can now be included in a covariance calculation in a similar manner as
the existing implementation of a weighted average.
Here (and all the occurances further down), I doubt that we import sum from numpy here, so better use the `weights.sum()` method for speed.