Add missing listener threads data vs fork() protection
The following races are problematic:
- fork() occurs concurrently with listener thread receiving commands.
- Mutexes and data structures can be left in incoherent state.
- fork() occurs concurrently with ust library destructor.
- listen_sock can be left in incoherent state in the child.
Protect these resources with their own specific mutex.
listener_thread_data_mutex protects all data/mutexes touched by the listener
thread. It is also held across fork to make sure the child see a coherent
version of these structures.
listen_sock_mutex protects the listen_sock teardown (pthread cancel done at
libust destructor). Is is also held across fork() to protect from concurrent
teardown of listen_sock. We add a check around listen_sock teardown to see if it
has already been deleted (which could happen if the destructor runs concurrently
with fork().