Make TunnelLogger thread-safe
Make TunnelLogger thread-safe

Now that we use threads in lots of places, it's possible for
TunnelLogger::log() to be called asynchronously from other threads
than the main loop. So we need to ensure that STDERR_NEXT messages
don't clobber other messages.

rycee/nix,dtzWill/nix,rycee/nix,shlevy/nix,dtzWill/nix,rycee/nix,NixOS/nix,ehmry/nix,layus/nix,NixOS/nix,ehmry/nix,layus/nix,zimbatm/nix,peti/nix,NixOS/nix,vcunat/nix,vcunat/nix,dezgeg/nix,layus/nix,rycee/nix,ehmry/nix,shlevy/nix,zimbatm/nix,peti/nix,shlevy/nix,peti/nix,pikajude/nix,shlevy/nix,NixOS/nix,ehmry/nix,dezgeg/nix,vcunat/nix,layus/nix,zimbatm/nix,dezgeg/nix,dtzWill/nix,ehmry/nix,NixOS/nix,peti/nix,layus/nix,shlevy/nix,rycee/nix,zimbatm/nix,dezgeg/nix,pikajude/nix,ehmry/nix,peti/nix,vcunat/nix,dezgeg/nix,pikajude/nix,dtzWill/nix,dtzWill/nix