condition_variable: fix fallout from commit 038c3eb for macOS
condition_variable: fix fallout from commit 038c3eb for macOS

Normally pthread_cond_timedwait expects wallclock time in the 'abstime'
parameter, and on macOS, it's not possible to change that to monotonic time.
As a result, commit 038c3eb caused all sorts of timing issues on macOS for
any code doing deadline-based waiting on condition variables. As an example,
ThreadJoiner configured to wait in 1000ms increments would instead use 10us
increments. This patch fixes this by switching back to relative time
waiting, as was done in ConditionVariable::TimedWait prior to that commit.

I tried doing the same on Linux so as to chain WaitUntil into WaitFor, but
that leads to overflows when the deadline is Max() due to a subtraction and
then an addition of potentially different values of Now().

Change-Id: If33329376af7a350e66c1d26c7bb57d7e5416236
Reviewed-on: http://gerrit.cloudera.org:8080/9695
Reviewed-by: Dan Burkert <4ef91e292a55314d2653d35ff669a6bd939ce515@apache.org>
Tested-by: Adar Dembo <866ca730bfc7f544e3ebce604ceeba4879f23df0@cloudera.com>
Reviewed-by: Todd Lipcon <2c763d726a8c2f6afda9be7e0e56a2caa6bb5e6b@apache.org>

cloudera/kudu,helifu/kudu,InspurUSA/kudu,InspurUSA/kudu,cloudera/kudu,EvilMcJerkface/kudu,andrwng/kudu,cloudera/kudu,InspurUSA/kudu,InspurUSA/kudu,andrwng/kudu,andrwng/kudu,cloudera/kudu,helifu/kudu,EvilMcJerkface/kudu,EvilMcJerkface/kudu,andrwng/kudu,EvilMcJerkface/kudu,helifu/kudu,EvilMcJerkface/kudu,andrwng/kudu,andrwng/kudu,helifu/kudu,InspurUSA/kudu,andrwng/kudu,andrwng/kudu,helifu/kudu,helifu/kudu,cloudera/kudu,InspurUSA/kudu,helifu/kudu,EvilMcJerkface/kudu,InspurUSA/kudu,cloudera/kudu,EvilMcJerkface/kudu,andrwng/kudu,cloudera/kudu,InspurUSA/kudu,cloudera/kudu,InspurUSA/kudu,helifu/kudu,EvilMcJerkface/kudu,helifu/kudu,cloudera/kudu,EvilMcJerkface/kudu