BUG: fix #3017 Inconsistency in indexing 0-d arrays with Ellipsis.
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.
TST: added test for issue #3017.

Also changed style to please numpy developers.
BUG: INCREF before DECREF when copying object arrays.

Only the change in dtype_transfer actually seems to be
related to the simple np.copyto(a, a) bug, when a is a scalar
object array.
It seemed however safer to me, to generally turn around the
logic, even if it may not be necessary and in one place
requires an extra temporary variable.

Closes gh-3787
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'
Merge pull request #3757 from dimasad/issue-3017-fix

BUG: fix #3017 Inconsistency in indexing 0-d arrays with Ellipsis.
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.
DOC: adding 'Returns' section to `empty` function

This matches the format of related functions like `empty_like` and `zeros`.
BUG: ufunc_at needs_api requires init to 0

as reported by valgrind...
Merge pull request #3795 from seberg/init_ufunc_at_needapi

BUG: ufunc_at needs_api requires init to 0
Merge pull request #3794 from perimosocordiae/patch-1

DOC: adding 'Returns' section to `empty` function docstring
Merge pull request #3788 from seberg/object-copy-refs

BUG: INCREF before DECREF when copying object arrays.
fix two typos in npyio.py
Merge pull request #3799 from esc/fix_typos_in_npyio.py

fix two typos in npyio.py
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