Move readChunk into Utils, add a "poor man's quickcheck" test for it.

Also remove the full-read logic from XZCompressInputStream, since it's
not part of the InputStream contract, and Utils.readChunk will do it.