core: add a facility to execute functions on the main io_service

Change-Id: I38e5f4ad5ed6798a14e0075fb7a14b792f8b2413
refs: #4683
diff --git a/daemon/main.cpp b/daemon/main.cpp
index 448b105..f6d482d 100644
--- a/daemon/main.cpp
+++ b/daemon/main.cpp
@@ -105,6 +105,7 @@
     std::atomic_int retval(0);
 
     boost::asio::io_service* const mainIo = &getGlobalIoService();
+    setMainIoService(mainIo);
     boost::asio::io_service* ribIo = nullptr;
 
     // Mutex and conditional variable to implement synchronization between main and RIB manager