drm_hwcomposer: refactor Worker

Make use of standard library mutex and conditions which simplifies use
of condition variables and benefits from things like scoped locking.

Also add tests to make sure it runs as expected.

Change-Id: Iaf92e17e1f6757dce490eddee61f84cb1f953b0c
diff --git a/drmhwctwo.cpp b/drmhwctwo.cpp
index 138f5fa..b13fce1 100644
--- a/drmhwctwo.cpp
+++ b/drmhwctwo.cpp
@@ -236,11 +236,7 @@
     hwc2_callback_data_t data, hwc2_function_pointer_t func) {
   supported(__func__);
   auto callback = std::make_shared<DrmVsyncCallback>(data, func);
-  int ret = vsync_worker_.RegisterCallback(std::move(callback));
-  if (ret) {
-    ALOGE("Failed to register callback d=%" PRIu64 " ret=%d", handle_, ret);
-    return HWC2::Error::BadDisplay;
-  }
+  vsync_worker_.RegisterCallback(std::move(callback));
   return HWC2::Error::None;
 }