BUG: restore api of npy_PyFile_DupClose in python2

breaks matplotlib
Merge pull request #5067 from juliantaylor/restore-dup

BUG: restore api of npy_PyFile_DupClose in python2
BUG: cannot convert invalid sequence index to tuple

A sequence which raises an error on item getting, should be just
handled as a single index and not a tuple nd-index.

Also fix some error handling.

closes gh-5063
TST: Test tuple subclass index and broken sequence index
Merge pull request #5066 from seberg/index-sequence

BUG: cannot convert invalid sequence index to tuple
BUG: fix out of bound access in unicode argmin/argmax

elsize is in bytes and the pointer of unicode type, so it must divided
by the size.
Closes gh-5082
Merge pull request #5087 from juliantaylor/unicode-argmin

BUG: fix out of bound access in unicode argmin/argmax
DOC: add section on compiling pyf files

Add section to remind the readers to recomplile add.pyf and add.f95
files before checking the add module in python
Merge pull request #5076 from kanhua/kh_fix

DOC: Minor fix on c-info.python-as-glue.rst
BUG: fix wrong error checks of PyBytes_AsStringAndSize

its documented to return -1 not negative on failure, though only the one
in ufunc_type_resolution.c was actually broken due to a spurious not and
buffer.c threw a ValueError without clearing the TypeError.
DOC: replacing old reference from EPD to Canopy
Merge pull request #5102 from dpinte/fix/epd_canopy

replacing old reference from EPD to Canopy
BUG: don't propagate subtypes from np.where

the C implementation cannot preserve subclass attributes, this needs a
python wrapper using indexing for subclasses.
closes gh-5095
BUG: check if object provides len() before trying to iterate it

some libraries want object arrays from objects that are iterable but
rely on not providing len() to get the right dtype from numpy.
closes gh-5100
BUG: check success of PyArray_DescrFromType in PyArray_InnerProduct

closes gh-5065
DOC: remove preservena reference from docstrings

preservena is not not implemented.
the putmask docstring is misleading, currently copyto is faster for
dense or sparse masks while putmask is faster for random masks.
[ci skip]
Merge pull request #5104 from juliantaylor/inner-fix

BUG: check success of PyArray_DescrFromType in PyArray_InnerProduct
Merge pull request #5105 from juliantaylor/where-no-subtype

BUG: don't propagate subtypes from np.where
Merge pull request #5106 from juliantaylor/sequence-fix

BUG: check if object provides len() before trying to iterate it
Merge pull request #5107 from juliantaylor/na-doc

DOC: remove preservena reference from docstrings