Reworked buffered reader, add hadoop protocol version, error on protocol errors

Change-Id: Ic91cacb3ca5ac3718c587fb4b153ea4556f91dcb