ENH: speed up intp multiply overflow check

Avoid expensive division by checking against half size of the result first.
Speeds up PyArray_NewFromDescr by a factor of two according to perf.
Could still be further improved by making use of cpu overflow flags, e.g. via
clangs __builtin_mul_with_overflow or using gccs __int128 type.
ENH: reduce calls to npy_is_aligned in _IsAligned

one can just bitwise_or the memory and all strides and call npy_is_aligned on
that to get the same result.
TST: improve test speed

move slow test_memmap_roundtrip to slow tests
decrease excessively large array size used in np.sin(x) compuation
TestInterp.test_if_len_x_is_small, the code has no special path for this
large size differences.
DOC: fixed correlate docstring.

Replaced correlation formula with corrected version that matches the
numpy implementation. Added comment on possible further different
definitions of correlation. Added examples.
Ensure masked arrays are treated correctly for isclose(..,..,equal_nan=True)
Merge pull request #3820 from juliantaylor/microopt

A couple micro optimizations
MAINT: add src/private in build_dir to include search paths

allows generating headers like npy_partition.h with the code generator
ENH: add scalarmathmodule.h.src with integer overflow functions

and use them in scalarmathmodule.c instead of the old (disabled) ones.
MAINT: add library sources to some dependencies

fixes missing recompilation of parts of numpy when the static libraries
change.
Merge pull request #3917 from juliantaylor/scalar-int-overflow

check integer overflows in scalarmath
BUG: Check that npyiter is not too large

Since NpyIter keeps track of the total size, this cannot be
larger then npy_intp, so that an overflow check is necessary.
Merge pull request #3918 from seberg/nditer-too-large

BUG: Check that npyiter is not too large
MAINT: update pavement.py for no-2to3.
Fix example plot of Laplace distribution

In the PDF used for the example plot of the Laplace distribution only the location parameter loc instead of the absolute difference between random variable and loc was divided by the scale parameter. For the example at hand this makes no difference as loc is 0 and lambda is 1. For different values, however, the plot makes no sense.
Merge pull request #3919 from nkoep/master

Fix example plot of Laplace distribution
DOC: replaced typeset formulas by pure ASCII equivalents.

Replaced typeset formulas by pure ASCII equivalents. Should now be
easier to read in source files.
DOC: Fix misleading description of random_sample in numpy.random docstring.
BUG: close file-like objects returned by urlopen

Fix `ResourceWarning: unclosed file` on Python 3
Merge pull request #3923 from cgohlke/patch-1

BUG: close file-like objects returned by urlopen
MAINT: add NPY_CPU_HAVE_UNALIGNED_ACCESS macro

currently only i386 and amd64, must be used carefully as the compiler
may still be allowed to assume alignment and try to vectorize based on
type size alignment.