This patch builds on the work done under D19412 where all pthread dependencies were refactored under a separate thread-support API.
The current patch enables building a new variant of libc++ where all the threading dependencies are exported into a runtime API. This allows platform vendors to re-target these threading calls in a platform-defined manner (at runtime), paving the way for libc++ on non-pthread platforms.
For running the libc++ test suite, I've introduced a sample implementation of this external-thread-API using pthreads. This implementation should give an idea of what the end goal is.
This patch supersedes the sketch presented in D19415.
I'm not sure I like taking the freedom to define _LIBCPP_MUTEX_INITIALIZER away from implementers.
Would it be too terrible to replace this entire #elif block with something like the following?