BLD: include f2py docs in source distribution

update was forgotten in the move to the doc/folder
BLD: exclude compiled python files in source distribution

they could accidentally appear in the source distribution if sdist was
run after a make -C doc.
MAINT: setup.py improvements - allow some setuptools commands to work.
BLD: check submodules on sdist

prevents broken source distributions due to not up to date submodules.
Detect vendor versions of GNU Compilers

Cray and other HPC vendors provide patched versions of the GNU compilers
with modified version strings.  Use re.search instead of re.match in the
version detection scripts to account for modified version strings.

Ref: https://github.com/numpy/numpy/issues/4259
ENH: remove insecure mktemp use

mktemp only returns a filename, a malicous user could replace it before
it gets used.
TST: fix test_io.TestSavezLoad
BUG: IRR was returning nan instead of valid negative answer.

This change corrects the following two bugs in numpy.irr:

* When the solution was negative, numpy.irr returned nan instead of the
  correct solution because of the mask applied to the roots. Corrected
  by removing the mask that 0 < res < 1.
* When multiple roots were found, numpy.irr was returning an array of
  all roots rather than a single float. This bug was corrected by
  selecting the single root closest to zero (min(abs(root)).

With these corrections, numpy.irr returns the same result as the
corresponding spreadsheet function in LibreOffice Calc for all test
cases (additional test cases were added to cover cases with multiple
positive and negative roots)
BUG: fix two missing array creation failure checks
BUG: fix missing memory allocation failure checks
BUG: fix use of capi without gil in ufunc.at

without a pointer to store the error NpyIter_ResetBasePointers uses
python errors to signal problems which requires the GIL.

Conflicts:
	numpy/core/src/umath/ufunc_object.c
BUG: Fix mean, var, std methods for object arrays.

This takes care to preserve the object type for scalar returns and
fixes the error that resulted when the scalar did not have a dtype
attribute.

Closes #4063.

Conflicts:
	numpy/core/tests/test_multiarray.py
BUG: don't change dtype in PyArray_CheckFromAny if it NPY_IGNORE

Closes gh-4254
Merge pull request #4297 from juliantaylor/backport-fixes-1.8

Backport fixes to 1.8