STY: make function_base.py pep8 compatible

This makes function_base.py almost pep8 compatible.
ALSO, removes the Set import which is unneeded since python 2.4,
and organises the import statements.
DEP, MAINT: Remove references to numeric and numarray.

This covers those locations that either import or build numarray
or numeric.
DEP, MAINT: Copy info function from numarray.

The numarray info function is called by lib.utils.info. Rename it
to _info and copy into lib/utils.py. Some modifications are made
as it only needs to support numpy.
DEP, DOC: Undocument numarray and numeric.

Mention that they were removed in 1.9.0.
DEP, DOC: Document removal of oldnumeric and numarray in release notes.
DEP: Remove deprecated modules numarray and oldnumeric.

They were deprecated in 1.8 and scheduled for removal in 1.9.

Closes #3637.
TST: speed up some very slow tests

Minimize alignment combinations to useful set with SSE, might need to
be revisited if we add AVX support.
Move large data test_zeros test to slow and drop the extremely slow
count_nonzero() call.
Rename gen_alignment_data to _gen_alignment_data (private) to reserve
right to change it, e.g. add min_size.
TST: delay error message building to failures in assert_almost_equal

improves test performance by about 15%
STY: Error and warning newline standardization in function_base.py

Continueing the pep8 effort, adds newline afer each `Error(`
and tries to wrap correctly.
STY: error and warning formatting on 'function_base.py'
MAINT: check alignment of copy arguments in debug mode

Allows catching unaligned access issues on x86.
Triggers TestRegression.test_complex64_alignment if the fix is reverted.

Also remove some dead code.
BUG: fix hashing of long integers under python3

python3 long_hash is more complex than int_hash so instead of copying
into numpy call it via the Python capi.
Same for long long for wich the numpy hash function is not correct with
python 2.7 on i386.
Will be slower but doesn't need adapting each timy python changes.
closes #3793
BUG: do a boolean check on casting bool to other types

avoids some issues of booleans coming from external buffers that may not
only contain 0 or 1.
closes #3801.
Merge pull request #3800 from juliantaylor/fix-long-hash

BUG: fix hashing of long integers under python3
Merge pull request #3802 from juliantaylor/bool-check

BUG: do a boolean check on casting bool to other types
Merge pull request #3775 from jarondl/doc-function_base-pep8

STY: make function_base.py pep8 compatible
Merge pull request #3789 from juliantaylor/check-alignment

MAINT: check alignment of copy arguments in debug mode
Merge pull request #3790 from juliantaylor/test-speedup

TST: speed up some very slow tests
[fix] Check for errors in PyArray_CanCastTypeto DEPRECATE

If a user had set warnings to raise errors, then this DEPRECATE would
leave us with an unpropagated exception and cause havoc downstream.

Unfortunately there is no way to propagate an exception from here, so
we just have to throw it away :-(. But this is still better than the
alternative...
BUG: fix wrong gcc version check

probably irrelevant by now, but emits a warning during compilation.