Synchronize output handler threads to avoid garbled output

Fabric is creating threads for each channel of every ssh connections. Each
of these threads is printing the outpout received from the remote but the
printing is not synchronized. This results in garbled output, for instance
if thread A is printing the "<hostname> out:" prefix while thread B is
printing the output of the remote command both printouts could be
shuffled.

Ecpected behaviour: Each thread should exculsivly print prefix + output
without being interrupted by another thread.

Synchronizing with multiprocessing locks to avoid garbled output.