BUG: fix missing check for memory allocation failure in ufuncs

closes gh-4018
BUG: fix uninitialized use in _strided_to_strided_string_to_datetime

dt == NPY_DATETIME_NAT is used as error condition, so initialize it to
something else.
BUG: fix NaT handling in _strided_to_strided_string_to_datetime

When converting an array of strings to datetime64, a "NaT" occurring
in the input would cause all subsequent values to be converted to NaT.
BUG: Fix missing NULL check in lexsort

When Getitem of the lexsort sequence argument failed
this was not checked.

Closes gh-4123
MAINT: don't use open(.., 'U') in Python 3.x, is deprecated.

This is default behavior in 3.x; in 2.x open() doesn't have a `newline`
kw.  So make code Python-version-specific.
TST: fix test failure due to comparing floats with assert_equal.

Observed on 32-bit linux with python 3.4b1
BUG: linalg: norm fails on longdouble, signed int

This fixes the following bug with longdouble:

>>> x = np.arange(10, dtype=np.longdouble)
>>> np.linalg.norm(x, ord=3)
Traceback (most recent call last):
  File "<ipython-input-5-7ee53a8ac142>", line 1, in <module>
    np.linalg.norm(x, ord=3)
  File "/tmp/v/lib/python2.7/site-packages/numpy/linalg/linalg.py", line 2090, in norm
    return add.reduce(absx**ord, axis=axis)**(1.0/ord)
UnboundLocalError: local variable 'absx' referenced before assignment

As well as the handling of minimal values for signed integers:

>>> x = np.array([-2**31], dtype=np.int32)
>>> np.linalg.norm(x, ord=3)
/tmp/v/lib/python2.7/site-packages/numpy/linalg/linalg.py:2090: RuntimeWarning: invalid value encountered in double_scalars
  return add.reduce(absx**ord, axis=axis)**(1.0/ord)
nan
BUG: fix loading from compressed .npz

In Python 2.6.x the number of bytes read from a zip file is 2^16, which
is less than the 2^18 requested by lib.format.py. This change handles
the case where fp.read() returns fewer than the requested number of
bytes.

Backport of gh-4115
BUG: fix complex norm of higher order

asfarray truncates the complex part, so it must be avoided for complex
types.
Closes gh-4156.
Merge pull request #4169 from juliantaylor/backport-fixes-1.8

Backport fixes to 1.8