MAINT: spatial.distance: generate boilerplate with macros
BUG: spatial.distance: fix unchecked malloc
MAINT: spatial.distance: further refactoring

* static on all functions in distance_impl.h
* commented out unused compute_mean_vector
* replaced &&, || with &, | in tight loops
* reindented code according to NumPy conventions
* removed some useless variables
BUG: io.netcdf: do not close mmap if there are references left to it

Fixes gh-3630
DOC: io: update netcdf docs vs mmap
DOC: io/netcdf: add example on mmap features, adjust doc

[ci skip]
TST: io/netcdf: remove invalid test

The "Too many open files" warning is actually unavoidable, since the
arrays refer directly to data in memory mapped files, and those files
cannot be closed as long as the arrays are around.
TST: io/netcdf: fix issues with warnings in tests

Ignore warning emitted in test_itemset_no_segfault_on_readonly.  Remove
a test using assert_warns; it doesn't clear warning registry, so the
warning in the other test makes this one not fire.
ENH: convert the cryptically named scipy.special information theory functions into ufuncs
TST: add negative values to scipy.special information theory function tests
DOC: improve scipy.special information theory ufunc docstrings
MAINT: add .pxd files
MAINT: simplify kl_div
MAINT: combine multiple ufuncs into the same .pxd file
DOC: remove docstring from UnivariateSpline.__init__

same for InterpolatedUnivariateSpline and LSQUnivariateSpline.
These simply duplicated the class docstrings.
DOC: improve the docstrings of *UnivariateSpline classes

Tweak examples to make plots actually render.
DOC: add a nan masking example to the UnivariateSpline docstring

example is by @juliantaylor,
https://github.com/scipy/scipy/issues/3531#issuecomment-40233093
[ENH] Add a step size parameter for optimize.check_grad
[TST] Add a unit test for optimize.check_grad
Merge branch 'check_grad', pull request #3945