While investigating https://llvm.org/PR42918, I noticed that the recursive_timed_mutex used the primitive thread-ids directly, rather than the convenience class __thread_id.
This fixes that, and makes it so we can fix the above issue only in __thread_id, rather than enshrining the "not a thread" knowledge in each of the OS-specific bits.
I'm a bit worried about ABI here, even though the field that I'm replacing is the same size.
If I were to commit this; I would probably move __thread_id and this_thread:: into <__threading_support> and remove this include.