test,stream: add test to writable stream not closed when readable stream emits error
The doc mentioned:
One important caveat is that if the Readable stream emits an error during processing, the Writable destination is not closed automatically. If an error occurs, it will be necessary to manually close each stream in order to prevent memory leaks.
Adding a test to verify / document this behaviour.