Handle `close` and `error` events.

Just handle them the same as `end` for now - pass it on, mark stream as finished.