Fix a bug in FDR mode which didn't allow for re-initialising the logging
in the same process. This change ensures that:
- When we flush the FDR mode logging, that the state of the logging implementation is XRAY_LOG_UNINITIALIZED.
- Fix up the thread-local initialisation to use aligned storage and pthread_getspecific as well as pthread_setspecific for the thread-specific data.
- Actually use the pointer provided to the thread-exit cleanup handling, instead of assuming that the thread has thread-local data associated with it, and reaching at thread-exit time.
In this change we also have an explicit test for two consecutive
sessions for FDR mode tracing, and ensuring both sessions succeed.