refactor: cleanup and sync

* Fix Jenkins scripts and sync with ndn-cxx
* Sync waf-tools
* Remove ChronoSync submodule
* Remove commented/dead code and includes
* Use ScopedEventId and ScopedRegisteredPrefixHandle
* Set setCanBePrefix to true explicitly everywhere
* Fix macOS build, add GHA CI
* Use NDN_THROW for throwing errors
* Other smaller fixes

Change-Id: I615e0e239511b97101852e1d7c620a2071a18ff8
diff --git a/src/chatroom-discovery-backend.cpp b/src/chatroom-discovery-backend.cpp
index 67dd7fa..3f92e01 100644
--- a/src/chatroom-discovery-backend.cpp
+++ b/src/chatroom-discovery-backend.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
 /*
- * Copyright (c) 2013, Regents of the University of California
+ * Copyright (c) 2020, Regents of the University of California
  *
  * BSD license, See the LICENSE file for more information
  *
@@ -11,7 +11,6 @@
 #include "chatroom-discovery-backend.hpp"
 #include <QStringList>
 
-
 #ifndef Q_MOC_RUN
 
 #endif
@@ -63,7 +62,7 @@
     try {
       m_face->getIoService().run();
     }
-    catch (std::runtime_error& e) {
+    catch (const std::runtime_error& e) {
       {
         std::lock_guard<std::mutex>lock(m_nfdConnectionMutex);
         m_isNfdConnected = false;
@@ -113,9 +112,6 @@
                                                 this, _1));
 
   // add an timer to refresh front end
-  if (m_refreshPanelId) {
-    m_refreshPanelId.cancel();
-  }
   m_refreshPanelId = m_scheduler->schedule(REFRESH_INTERVAL,
                                            [this] { sendChatroomList(); });
 }
@@ -124,7 +120,6 @@
 ChatroomDiscoveryBackend::close()
 {
   m_scheduler->cancelAllEvents();
-  m_refreshPanelId.reset();
   m_chatroomList.clear();
   m_sock.reset();
 }
@@ -169,9 +164,9 @@
         return;
       }
       else {
-        if (it->second.helloTimeoutEventId) {
+        if (it->second.helloTimeoutEventId)
           it->second.helloTimeoutEventId.cancel();
-        }
+
         it->second.isManager = false;
       }
 
@@ -250,10 +245,6 @@
   if (it != m_chatroomList.end() && it->second.isManager) {
     ndn::Block buf = it->second.info.wireEncode();
 
-    if (it->second.helloTimeoutEventId) {
-      it->second.helloTimeoutEventId.cancel();
-    }
-
     m_sock->publishData(buf.wire(), buf.size(), FRESHNESS_PERIOD, it->second.chatroomPrefix);
 
     it->second.helloTimeoutEventId =
@@ -431,9 +422,6 @@
   }
 
   emit chatroomListReady(chatroomList);
-  if (m_refreshPanelId) {
-    m_refreshPanelId.cancel();
-  }
   m_refreshPanelId = m_scheduler->schedule(REFRESH_INTERVAL,
                                            [this] { sendChatroomList(); });
 }