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.
This change allows ufunc operand flags to be set in addition to the
default operand flags set by the nditer object. For example, after
calling PyUFunc_FromFuncAndData() to create a ufunc object, the first
operand can be set to be read/write like so:

ufunc->op_flags[0] = NPY_ITER_READWRITE

Setting flags for output operands is not supported at this time and
will raise an exception.

This change also allows the global nditer flags to be set, so after
setting the read/write flag, the reduce ok flag could be set like so:

ufunc->iter_flags = NPY_ITER_REDUCE_OK
minor fixes for previous ufunc operand flag change
initialize ufunc op_flags pointer in frompyfunc()
correctly initialize op_flags and iter_flags in frompyfunc()
Remove guard against read+write output operands
Update c api documentation
Add test for setting operand flags through c api
Fix python 2/3 issues in operand_flag_tests module
Fix formatting issues
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.