xplat: pthread_exit call needed to free TLS
Thread-local storage for pthreads don't get destructor calls unless
pthread_exit is called from their thread; this happens implicitly in
non-main threads, but needs to be explicitly done in main.
Only doing this in ASAN builds, as it causes issues with OSX pthread
implementations.