Fix #935: DataInputStream for partially used ArrayBufferInputStreams

The special casing of DataInputStream for ArrayBufferInputStreams
behaved incorrectly, when the underlying stream was partially
consumed. This commit fixes this by exposing the
ArrayBufferInputStream's current position and using it instead of a
position variable internal to DataInputStream.