Imprevements to prevent memory copies where possible

Re-wrote read_zfile to accept an optional buffer to write the file data
directly into.  This allows for copyless reading in Python 2.x.

Changed write_zfile to accept numpy ndarrays directly
and flatten them in chunks to support copyless writing in all
supported versions of Python.

There is a constraint on Python3.x that the version of numpy must be
>= 1.7.  This could be worked around by adding back the original code
as an optional path for older versions of numpy.