exit destroys the exiting thread's thread-locals before it runs the exit handlers (macOS, and
the GNU C library too: the new exits lane case aborted on lavapipe as on the M3), and
std::thread::current panics there once the thread's handle went with them. In an exit handler,
which cannot unwind, that panic ends the process.
this_thread.rs gives a thread's identity that stays readable to the thread's end: id(), the
address of a const thread-local with nothing to drop, and runs(handle), pthread_equal of the
handle's pthread_t and pthread_self on unix. The device word's lock (loader_word.rs, reached by
calls the loader serves, such as a command buffer's allocation) keys its holder by id(); the
teardowns that do not join their own thread (completion waiters, host residency, the pipeline
reaper, the scheduler and its is_current, the twin decoder) ask runs(). The comments that said
this happens only on macOS now point at this_thread.rs.
Verified with the exits lane case in the next commit (M3, lavapipe, a Linux GPU).