improved the cb_cond_timewait for pthreads

Change-Id: Ie31cbfa7fe54cba6cc46a1d4dfb461e5b98026bf
Reviewed-on: http://review.couchbase.org/30049
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>