Always use clock now function ptr in TaskRunner

Currently, the TaskRunner relies on the STL's understanding of the
system clock for some things, like the wait predicate, and uses the
actual platform::Clock for some unit tests. This causes unpredictable
behavior in our build bots, as well as violating best practices.

This patch moves to using a platform::ClockNowFunctionPtr in the
TaskRunnerFactory, always calling that FunctionPtr to get time updates
in the TaskRunnerImpl, and always passing a fake clock in unit tests.

Change-Id: I054f176ff34ee1bbd841e0f6cffef01de6af1af8
Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/1560312
Commit-Queue: Jordan Bayles <jophba@chromium.org>
Reviewed-by: Peter Thatcher <pthatcher@google.com>
Reviewed-by: Ryan Keane <rwkeane@google.com>
diff --git a/api/impl/task_runner_impl.h b/api/impl/task_runner_impl.h
index 7c40b9c..c8be03f 100644
--- a/api/impl/task_runner_impl.h
+++ b/api/impl/task_runner_impl.h
@@ -79,6 +79,10 @@
   // minimum delay time has elapsed.
   void ScheduleDelayedTasks();
 
+  // Look at the current state of the TaskRunner and determine if the run loop
+  // should be woken up
+  bool ShouldWakeUpRunLoop();
+
   // Takes the task_mutex_ lock, returning immediately if work is available. If
   // no work is available, this places the task running thread into a waiting
   // state until we stop running or work is available.