Reorganize how streams end, clean up parts of stream tests.

Now included is a more sane way for handling a pseudo `_flush` handler. It turns out that if you use `expect` in an event from an event emitter, any exception you throw will be transparently captured and re-emitted as an error event; not necessarily what you want. try-catch blocks have been added for those cases to forward the error to the real handler.