Pipe fixes.
Pipe fixes.

Fix the arguments to buffer.copy (sourceEnd, not length). And fix the case where
the writer ends without performing a write, but there’s still a pending read.

mbostock/rw,mbostock/rw