util: Introduce Scheduler::cancelAllEvents to cancel all previously scheduled events

Change-Id: I11e736bec855fe4122915486faec369237cf64a6
Refs: #1757
diff --git a/src/util/scheduler.cpp b/src/util/scheduler.cpp
index d51f83d..998728f 100644
--- a/src/util/scheduler.cpp
+++ b/src/util/scheduler.cpp
@@ -151,6 +151,13 @@
 }
 
 void
+Scheduler::cancelAllEvents()
+{
+  m_events.clear();
+  m_deadlineTimer.cancel();
+}
+
+void
 Scheduler::onEvent(const boost::system::error_code& error)
 {
   if (error) // e.g., cancelled