implement incremental decoder

in the very rare case that child process writes utf8 multibyte
characters to stdout, and the read() call reads one of these sequences
incompletely, we use an incrementaldecoder.