PNG: reduce the amount of memory needed to read most tiles

The very last row of tiles will still require the full image to be
read, however.
PNG: use a custom InputStream implementation for decompressing images

This prevents us from having to read the entire compressed stream into
memory before decompressing.  See #12274.
Merge pull request #1450 from melissalinkert/png-memory

Reduce memory needed to open PNG images