Introducing the Big Tinc Lock.
Now that tinc is multi-threaded, we need some form of synchronisation. For
now, there is a single mutex which we lock whenever we do something with global
data structures. The main thread, from which timer events are handled, is
always locked unless it is sleeping for the next event, the other threads
receive incoming I/O unlocked, and lock to process the received data.
In the future more fine-grained locking should be used, probably in the form of
rwlocks, or lockless algorithms (maybe RCU).