Check the value of read/write in OFStreamObserver.

Some systems like Ubuntu have libc headers which specify an attribute
that the compiler should issue a warning if the return value is ignored.