Fix shutting down FastClock's thread on OSX.

Use a condition variable instead of a semaphore to signal FastClock background thread to exit since it looks like sem_getvalue does not really work on OS X. This should probably be platform specific.