stream: Fix double error emit in pipe
If an error listener is added to a stream using once() before it is piped,
it is invoked and removed during pipe() but before pipe() sees it which causes
it to be emitted again.

Fixes #4155 #4978