Ability to dump mutex_lock, mutex_unlock and cond_wait timing, if compiled with -D_PTHREAD_DUMP
Remove unneccessary locks by adding threadqueue->queue_running counter
Only signal the required number of threads
Change SLEEP(0) to SLEEP(10) on Windows.

- This is a workaround for a performance problem on Windows where main thread
  is busy looping.
Merge branch 'threadqueue-performance-fix'