ENH: unroll correlate loops

Unrolling the inner loop ensures the kernel is placed into registers and
reused, this almost doubles performance.
Also move the function to arraytypes.c.src where also our dot product is
placed.
The templ_common.h might still be useful in future so its kept.
Merge pull request #5135 from juliantaylor/correlate-improve

ENH: unroll correlate loops
BUG: Make numpy import when run with Python flag '-OO'.

This consists of checking for a docstring equal to None and skipping two
tests that require docstrings.

Closes #5148.
TST: Add test with python flag -OO.
Merge pull request #5149 from charris/fix-ma-docs-for-OO-option

BUG: Make numpy import when run with Python flag '-OO
MAINT: Improve computation of scaled companion matrices.

The previous method used for hermite and hermite_e polynomials suffered
from double overflow for polynomials of large degree. Those numbers were
later scaled down by equally large numbers, but the result was NaN. The
wanted values are now computed in such a way that overflow in some
entries is replaced by underflow in others. The resulting zeros are a
negligible perturbation of the companion matrix.
MAINT: Improve computation of gauss weights for hermite and hermite_e.

The new computations use normalized polynomials. Those polynomials are
less subject to overflow and allow the determination of the weights and
roots up to about degree 350, at which point the weights underflow.

Two private functions are added for computing the values of the
normalized polynomials:

1. _normed_hermite_n
2. _normed_hermite_e_n
BUG: fixed #5147 collapsingbug in einsum
Merge pull request #5152 from tovrstra/collapsingbug

fixed #5147 collapsingbug in einsum
fix intention of loop in test_copyto_permut
Merge pull request #5160 from bdkearns/master

fix intention of loop in test_copyto_permut
BUG: remove static from function to avoid gcc-4.1 miscompile

gcc 4.1.2 (e.g. in red hat 5) will miscompile the function when
inlining. Without static it will not inline solving the issue.
Closes gh-5163
BUG: Make f2py work with intent(in out).

Note that Fortran ignores spaces in this case, so that 'in out' is
treated as 'inout'.

Closes #479.
TST: Add basic test for compiling with intent(in out).

This checks that the compilation works and that the expected error
is raised when non-contiguous arrays are passed as intent(in out).
Merge pull request #5167 from juliantaylor/rh5-miscompile

BUG: remove static from function
Merge pull request #5154 from charris/improve-gauss-hermite

Improve gauss hermite
Merge pull request #5168 from charris/f2py-space-fix

BUG: Make f2py work with intent(in out).
MAINT: replace bytewise copy with memcpy

memcpy takes care of unaligned memory and is inlined by the compiler,
there is no need for own code.
Merge pull request #5169 from juliantaylor/pyobjcopy-simplification

MAINT: replace bytewise copy with memcpy
ENH: allow auto vectorization of integer loops

Generalize the loop specializations with two new macros UNARY_LOOP_FAST
and BINARY_LOOP_FAST and apply it to more integer loops.
Same also gh-4561 which did this for integer boolean operations.