In parseStream, atom.size is initailized to uint32 max. If the loop in
readDefault then never executes because the stream has hit EOF, that size is
passed as-is to seek. This can cause a crash eg in SeekableSubReadStream
because of an int overflow.
Change readDefault to return an error in a few places if we have hit eof before
a valid atom has been read. It's ok not to do the seek in this case.
zlib is used when available and falls back on gzio.
This allows performance improvements as our CRC32 and gzio
implementations are slower than base zlib.
As zlib is available when libpng is present, this is sensible to
benefit from it.