server: re-activate the background watch flushing thread

We acquire a mutex when we want to write to the output channel
from either the main loop or the background watch flushing
thread.

Signed-off-by: David Scott <dave.scott@eu.citrix.com>