[SPARK-4107] Fix incorrect handling of read() and skip() return values

`read()` may return fewer bytes than requested; when this occurred, the old code would silently return less data than requested, which might cause stream corruption errors.  `skip()` faces similar issues, too.

This patch fixes several cases where we mis-handle these methods' return values.
[ByteStreams.readFully()](http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/io/ByteStreams.html#readFully(java.io.InputStream,%20byte[])) only throws `IOException` and `EOFException`(which is a subclass of `IOException`).