fifo: fix message intermingling from stdin and fifo

Switched from a two-buffer shuffle to per-stream dedicated buffers.
Originally both stdin and fifo fed into a common input buffer which was
swapped with an output buffer at opportune moments. Problem was that
messages could mangle each other any time partial reads or writes came
into play. Now each input stream has its own buffer which the output
routine can write directly out of.