model+apps+utils+examples+ci+docs: Update code for changes in ns-2.23

- Replace removed RandomVariable with RandomVariableStream
- Replace deprecated usages of AddTraceSource
- Update changed LogComponent interface

ci: This commit also integrates a script for Jenkins and Travis CI to
clone NS-3 and pybindgen repositories, so the code can be built.

docs: Update to reflect new home of ndnSIM and related sources

Change-Id: Ic14e1269bf15366b0041fd670c577053b6704dc7
Refs: #3122, #3123
diff --git a/.jenkins.d/00-prepare.sh b/.jenkins.d/00-prepare.sh
new file mode 100755
index 0000000..67e579f
--- /dev/null
+++ b/.jenkins.d/00-prepare.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+set -e
+set -x
+
+git rm -qrf .
+git clone --depth=1 https://github.com/named-data-ndnSIM/ns-3-dev ns-3
+git clone --depth=1 https://github.com/named-data-ndnSIM/pybindgen.git pybindgen
+mkdir -p ns-3/src/ndnSIM
+mv .git ns-3/src/ndnSIM/
+(cd ns-3/src/ndnSIM/ && git reset -q && git checkout . && git submodule update --init)
+
+mv ns-3/src/ndnSIM/.jenkins.d . # move CI scripts back, so the rest of them can be executed
diff --git a/.jenkins.d/10-build.sh b/.jenkins.d/10-build.sh
index da977d5..b0ec560 100755
--- a/.jenkins.d/10-build.sh
+++ b/.jenkins.d/10-build.sh
@@ -5,10 +5,13 @@
 JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
 source "$JDIR"/util.sh
 
+pushd ns-3 >/dev/null
+
 git submodule update --init
 
 # Cleanup
-sudo ./waf -j1 distclean
+sudo rm -Rf build/ .waf-1* .waf3-1*
+find . -name '*.pyc' | sudo xargs rm -f
 
 if has Ubuntu-12.04 $NODE_LABELS; then
     EXTRA_FLAGS=" --boost-libs=/usr/lib/x86_64-linux-gnu"
@@ -26,3 +29,5 @@
 elif has FreeBSD $NODE_LABELS; then
     sudo ldconfig -a
 fi
+
+popd >/dev/null
diff --git a/.jenkins.d/20-tests.sh b/.jenkins.d/20-tests.sh
index 01ce1a2..cd1d39f 100755
--- a/.jenkins.d/20-tests.sh
+++ b/.jenkins.d/20-tests.sh
@@ -5,9 +5,13 @@
 JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
 source "$JDIR"/util.sh
 
+pushd ns-3 >/dev/null
+
 # Run unit tests
 if [[ -n "$XUNIT" ]]; then
-    ./build/src/ndnSIM/tests/ns3-dev-ndnSIM-unit-tests-debug --log_format=XML --log_sink=build/xunit-report.xml --log_level=all --report_level=no
+    ./waf --run "ndnSIM-unit-tests --log_format=XML --log_sink=build/xunit-report.xml --log_level=all --report_level=no"
 else
-    ./build/src/ndnSIM/tests/ns3-dev-ndnSIM-unit-tests-debug -l test_suite
+    ./waf --run "ndnSIM-unit-tests -l test_suite"
 fi
+
+popd >/dev/null