Replace workers std{out,err} by pipes and log anything written to them

This will help us identify problems in libnotmuch and reduces visual
artifacts (unfortunately libnotmuch writes messages to stderr that
used to clobber the curses interface).