Separated Pipe and PipeConsumer. Added flushing for pipes which buffer output.