Ensure completion of Readable streams returned by tasks

If a task returns a Readable stream, ensure that it processes to completion.
stream-consume module is used for this purpose.

Also: 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. This prevents premature task
termination while, e.g., a Transform stream is still processing.