fallback to imprecise scaling if low memory

Gracefully falls back to rough scaling to solve the OutOfMemoryErrors that I was able to reproduce on a GB emulator with low RAM. This helps a lot since it doesn't require two large Bitmap objects in memory at the same time.

Also moved away from BufferedInputStream to another workaround to the Android bitmap problems, which will save more memory. On top of that, we weren't closing the streams so that's also fixed.
The contract is not that strong, but in practice read() will only return short of the requested value if less than the requested value is available.  That should only happen when reading from the network.  I'm mostly curious how this came up.