BUG: Fix indexing 0-sized arrays using empty fancy-indexes

Due to subspace creation for fancy indexing selecting the 0s
element on every fancy dimension, this failed if the dimension
was empty. Propagating check_index to disable the unnecessary
check in this case.
ENH: Allow newaxis in combination with fancy indexing.

This commit allows the use of None when also using fancy indexing.
To achieve this mit->consec is used to note the denote the
transposition axis (which means that if its consecutive but at the
start, mit->consec==0, and no transposition is necessary).
BUG: Check for maximum dimension for fancy indexing.
BUG: Do not ignore subspace unless it is true 0-d

This is  more important when allowing newaxis, but already before
lead to successful indexing when it should not be suspected.
Also some maintenance.
MNT: Tiny cleanup for mapping.c and comments
TST: Add fancy indexing test for tuple indexing

This is a first version of fancy indexing tests by mimicing the
behavoir in python. Note that error messages are not tested.
DOC: Advanced indexing using np.newaxes

Mention in release notes and remove documentation which may
give the idea it cannot be used with advanced indexing.
ENH: use intrinsics for isnan, isfinite and isinf

Use of intrinsics avoids expensive function calls in tight loops on x86
cpus where these operations are implemented in hardware while still
retaining same portability.
More than doubles performance of np.isnan/isinf/isfinite.
MAINT: Remove unnecessary and wrong check for mapiterswap

With the slight modification of the MapIter API to allow newaxis
in fancy indexes, the MapIterObject consec field is already the
axis to transpose to, and with a leading newaxis, even if
iteraxes[0] is 0, consec may not be 0.
MAINT: check for intrinsics at configure time
BUG: Fix 0-d array special case from reductions.

This channels scalars through the usual reduction machinery and
modifies it slightly to correctly support scalar reductions of
identity-less ufuncs.
ENH: add possibility to add define_macros to extensions
MAINT: mask npy_config.h include with HAVE_NPY_CONFIG_H
MAINT: document intrinsic macro guards
MAINT: document why OPTIONAL_INTRINSICS needs arguments
Fix array_equal and array_equiv issue

array_equal() and array_equiv() don't work for string arrays and record arrays. This is because those methods use numpy.equals ufunc for comparison, and there are no equal ufuncs registered for strings and record arrays. Replace numpy.equals with '==' array operation, which handles strings and record arrays.
Make comparison function (gt, ge, ...) respect __array_priority__.
Merge pull request #3316 from seberg/issue-3314

BUG: Fix 0-d array special case from reductions.
ENH: Add a runtests.py script for running the test suite

The script builds Numpy and runs the test suite of the built version.
This is useful for development.
Merge pull request #2701 from seberg/indexing

Fancy Indexing enhancements and bug fixes