ENH: added functionality nanmedian to numpy

Implemented a nanmedian and associated tests as an
extension of np.median to complement the other
nanfunctions

Added negative values to the unit tests

Cleaned up documentation of nanmedian
ENH: add small memory chunk cache

Add very simplistic caching of small memory blocks (< 1024 bytes)
This improves the performance of small array operations by about 15%-20%:

without cache:
In [1]: d = np.array([1,1])
In [2]: %timeit d*d*d*d
1000000 loops, best of 3: 2.1 µs per loop

with cache:
In [1]: d = np.array([1,1])
In [2]: %timeit d*d*d*d
1000000 loops, best of 3: 1.7 µs per loop

The cache is a simple list of buckets of pointers, one for each size up
to 1023 bytes.
Two caches are required one for array data one one for
dimensinos/strides as they use different allocators.
All pointers can still be deleted with their matching deallocator but
this implies the size of the block must be known at the time of the free
in order to place the pointer in the right bucket. This should not be an
issue for well behaved numpy users.

Technically the ABI is broken in this change as the size of the
dimension memory block has been decreased from 3 * nd to 2 * nd, the
increase to 3 was a relic from the NA branch and is not needed anymore.
It should be unlikely someone relies on this size.
ENH: release GIL for callocs

useful for programs that block operations to avoid hitting the memory
bandwidth wall.
MAINT: move memory allocator functions to own file alloc.c
Merge pull request #4606 from juliantaylor/small-memcache

ENH: add small memory chunk cache
Merge pull request #4307 from dfreese/feature/nanmedian

ENH: added functionality nanmedian to numpy
BUG: Add @DEFINE_NPY_RELAXED_STRIDES_CHECKING@ to _numpyconfig.h.in.

The entry is needed for Bento builds to correctly configure numpy.
Merge pull request #4682 from charris/fix-_numpyconfig.h.in

BUG: Add @DEFINE_NPY_RELAXED_STRIDES_CHECKING@ to _numpyconfig.h.in.
MAINT: start 1.10-devel.

* Create 1.10.0-notes.
* Add 1.10.-notes to the generated documentation.
* Update version number in setup.py
MAINT: Change default inplace, ufunc(...,out=x) casting to same_kind.

There has been a warning of this change since numpy 1.7. numpy 1.10
is a good time to do it. The nanvar function needed a fix after the
change, and the tests and documentation are updated.
MAINT: Update pavement.py to 1.10.0.
MAINT: Remove the polytemplate.py file.
MAINT: Make NPY_RELAXED_STRIDE_CHECKING true by default.