ENH: Adding np.nanmean(), np.nanstd(), np.nanvar()
TST: Added tests for nanmean(), nanvar(), nanstd()
MAINT: Separate nan functions into their own module.

New files lib/nanfunctions.py and lib/tests/test_nanfunctions.py are
added and both the previous and new nan functions and tests are moved
into them.

The existing nan functions moved from lib/function_base are:

    nansum, nanmin, nanmax, nanargmin, nanargmax

The added nan functions moved from core/numeric are:

    nanmean, nanvar, nanstd
MAINT: Clean up core/_methods.py and core/fromnumeric.py

Use issubclass instead of issubdtype.
Add some blank lines.
Remove trailing whitespace.
Remove uneeded float casts since true_divide is default.
Clean up documentation a bit.
BUG: Make mean, sum, var, std methods return correct scalar type.

The return type could differ depending on whether or not the value
was a scalar.
ENH: Make var and std methods raise error when ddof too big.

Currently the results may be infinite or negative. Instead, raise a
ValueError in this case.
TST: Add more extensive tests for the mean, var, and std methods.

Test the mean, var, and std methods more extensively. In addition, add
tests that:

    Check that scalar return types ar what they should be.
    Check that ValueError is raised when ddof is too big.
MAINT: Refactor nanfunctions.

nanmax, nanmin
--------------
Add out and keepdims keywords.

nanargmin, nanargmax
--------------------
A NanWarning is raised if an all NaN slice detected. For all such
slices np.iingo(np.intp).min is returned as the index value.

nansum
------
The keywords dtype, out, and keepdims are added.

A FutureWarning is raised, as in the future the mean of an empty
slice after NaN replacement will be 0 instead of the current NaN.

nanmean, nanvar, nanstd
-----------------------
For all, if the input array is of inexact type then the dtype and out
parameters must be of inexact type if specified.  That insures that NaNs
can be returned when appropriate.

The nanmean function detects empty slices after NaN replacement and
raises a NanWarning. NaN is returned as the value for all such slices.

The nanmean and nanstd functions detect degrees of freedom <= 0 after
NaN replacement and raise a NanWarning. NaN is returned as the value for
all such slices.
TST: Add tests for the nansum, nanmean, nanvar, and nanstd.
DOC: Document nanmean, nanvar, and nanstd in the 1.8.0 release notes.
BUG: Regression test needs to ignore ComplexWarning.

This was raising a warning during tests.
DOC: Various fixes.

Fix typos and clarify some explanations. Document the changes in the return
values of nanargmin and nanargmax for all-NaN slices in the 1.8.0 release
notes.
Merge pull request #3534 from charris/nan-stat-functions

Add nanmean, nanvar, and nanstd functions.