Moves the current clone-based thread routines to thread_clone.h.
Moves the current Windows thread routines into thread.h and adds a pthread-based UNIX parallel implementation.
Updates api/detach.c and api/startstop.c to use the new cross-platform routines.
Moves the _WIN32_WINNT define for condvar.h from needing to be in each test's code (due to header order limitations) to be auto-magically added from cmake.
Updates other tests to include the right header files.