Batched worker thread for queued task event handlers.

This re-uses the code that handles task job submission. It also tidies
up associated stdout and suite logging a little, and tidies up suite
shutdown (avoid tracebacks on early abort due to attempt shutdown of
uninitialized items, and re-order shutdown of threads and pyro
connections so that the main thread doesn't appear to exit before the
other threads have finished).