[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.
because we are supposed to return None if this fails ... it is pretty easy to recover from OOM here, if the OOM is due to the creation of the array.