Add chunked support from PipeInputStreams

Hi.

I needed this for some threaded-style processing where I didn't know the length up front.

Hope it's OK. Sorry that the test in implementation-specific, but I couldn't think how to write a size-forcing pipe.