Implement stub for pthread_cond_timedwait().

This was in the headers, but had no implementation resulting in
an undefined at runtime.
Add some return values for pthread_cond_*.
Merge pull request #926 from waywardmonkeys/implement-pthread-cond-timedwait

Implement stub for pthread_cond_timedwait().