Handle legacy and Writable streams

When processing a stream returned from a task, only try to consume
readable streams. Drain legacy readable streams by registering a ‘data’
handler.
Tweak end-of-stream configuration

end-of-stream was previously reporting completion if a Writable or
Readable completion event was received. Be more discerning: if it’s a
Readable stream, require Readable completion. If it’s not Readable but
is Writable, require Writable completion.