Factor READABLE and WRITABLE out of STREAM

Switch from 'peek' and 'drop' to
* read: read some data
* write: write some data
* advance: manually advance the stream

I think thinking in terms of reading and writing is closer to
the truth than queues, with the exception that the stream has
to be manually advanced.

Signed-off-by: David Scott <dave.scott@citrix.com>