Fix for small write buffer.

We were only doubling the write buffer once, but we may need to make it much,
much bigger in some cases.
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.
Add pipe example.