ENH: Use nditer in numpy.save to stream bytes to custom file objects
TST: Increase test coverage of numpy.save/load roundtrips
Merge pull request #4077 from ogrisel/streaming-numpy-save

Streaming numpy.save to arbitrary file objects
ENH: implement pairwise summation

pairwise summation has an average error of O(log(n)) instead of O(n) of
the regular summation.
It is implemented as summing pairs of small blocks of regulary summed
values in order to archive the same performance as the old sum.

An example of data which profits greatly is
d = np.ones(500000)
(d / 10.).sum() - d.size / 10.

An alternative to pairwise summation is kahan summation but in order to
have a low performance penalty one must unroll and vectorize it,
while pairwise summation has the same speed without any vectorization.
The better error bound of O(1) is negligible in many cases.
ENH: umath: simplify pairwise sum

Simple recursive implementation with unrolled base case. Also fixed
signed/unsigned issues by making all indices signed.

Added a unit test based on @juliantaylor's example.

Performance seems unchanged: still about a third faster than before.
ENH: fix stride issue and unroll 8 times to improve accuracy

Fix missing stride accounting in calling recursive function.
Unroll 8 times to improve accuracy and allowing vectorizing with avx
without changing summation order.
Add tests.