This change is the basis for a further refactoring where I'm going to
split up the various implementations we have in __threading_support to
make that code easier to understand.
Note that I had to make __convert_to_timespec a template to break
circular dependencies. Concretely, we never seem to use it with anything
other than ::timespec, but I am wary of hardcoding that assumption as
part of this change, since I suspect there's a reason for going through
these hoops in the first place.
In fact __libcpp_timespec_t is unconditionally a typedef for ::timespec; so could we just use ::timespec here?
The template solution isn't too bad, but it still seems like it's working around a problem that shouldn't have been a problem in the first place.