Backport of unpipe fixes from node/master

Fixes https://github.com/isaacs/readable-stream/issues/43 .

Attributed to @AndreasMadsen since the only change I made was to adapt the 2 tests to use the local Readable / Writeable implementation.