Make a context manager to capture all output to a stream.
Switch task to use new capture_output context manager
Improve output streaming from daemon to client process. refs #2721
Add --wait option to 'daemon stop' command, to wait for all tasks to finish
task queue now logs how many tasks have to finish before shutdown