osx: OSX has a diff. way of setting thread name

prctl(PR_SET_NAME, ...) vs. pthread_setname_np(1arg) (OSX)
linux/threads: simplify timer code

Possibly also changes the semantics. According to the docs, it should now be
equal to the Windows code (up to accuracy issues, of course).

ping @gregory38
osx: implement DarwinThreads.cpp

This was sufficiently different from the Linux (POSIX) version because:

1. OSX doesn't implement the POSIX realtime extension we need for that
2. To get similar values, we have to interface with the Mach microkernel at
the bottom of the OSX hybrid kernel (XNU). Which isn't shared by any other
OS we might possibly support.
osx: emulate pthread_mutex_timedlock()

OSX helpfully doesn't implement this. Added an (untested) implementation
through pthread_mutex_trylock(). This might be very bad for performance and
thus alternatives could be sought. Perhaps we can do something with
condition variables which also have a timedwait (even on OSX I think). The
Mach primitives don't readily seem to contain a timed wait, pity.
osx: implement DarwinSemaphore.cpp

OSX pthreads doesn't implement sem_timedwait(), which is a real shame. The
Mach subsystem does have a semaphore_timedwait() variant though.

This code is untested, and server mostly as a reference and to test and
improve the final implementation once OSX/64-bit can properly compile.