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/.jenkins b/.jenkins
index 674d751..bc1c847 100755
--- a/.jenkins
+++ b/.jenkins
@@ -1,10 +1,32 @@
 #!/usr/bin/env bash
 set -e
+source .jenkins.d/util.sh
 
-DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+export CACHE_DIR=${CACHE_DIR:-/tmp}
+export WAF_JOBS=${WAF_JOBS:-1}
+[[ $JOB_NAME == *"code-coverage" ]] && export DISABLE_ASAN=yes
 
-for file in "$DIR"/.jenkins.d/*; do
+nanos() {
+    # Cannot use date(1) because macOS does not support %N format specifier
+    python3 -c 'import time; print(int(time.time() * 1e9))'
+}
+
+for file in .jenkins.d/*; do
     [[ -f $file && -x $file ]] || continue
-    echo "Run: $file"
+
+    if [[ -n $TRAVIS ]]; then
+        label=$(basename "$file" | sed -E 's/[[:digit:]]+-(.*)\..*/\1/')
+        echo -ne "travis_fold:start:${label}\r"
+        echo -ne "travis_time:start:${label}\r"
+        start=$(nanos)
+    fi
+
+    echo "\$ $file"
     "$file"
+
+    if [[ -n $TRAVIS ]]; then
+        finish=$(nanos)
+        echo -ne "travis_time:end:${label}:start=${start},finish=${finish},duration=$((finish-start)),event=${label}\r"
+        echo -ne "travis_fold:end:${label}\r"
+    fi
 done