darwin: merge uv_cond_timedwait implementation

This is a revised version of commit 8311390.