Ensure masked arrays are treated correctly for isclose(..,..,equal_nan=True)
Merge pull request #3914 from mhvk/numeric/isclose-mask-safe

BUG Masked arrays treated incorrectly in isclose(..,..,equal_nan=True)
BUG: cov/corrcoef complex input and empty arrays

This preserves the complex (and higher precision float or
object) type of the input array, so that the complex
covariance and correlation coefficients can be calculated.

It also fixes the the behaviour of empty arrays. These will
now either result in a 0x0 result, or a NxN result filled
with NaNs.

A warning is now issued when ddof is too large and the factor
set to 0 so that in this case the result is always NaN or
infinity/negative infinity and never a negative number.

Closes gh-597 and gh-2680
Closes gh-3882 (original pull request)