* thread.cc (__pthread_cond_dowait): Fix a race on signalling from a thread woken by the same condition variable it's signalling on. Thanks to Michael Beach for the report and test case.