build+core: Add printing of version number in daemons and tools

This commit also changes how version number is handled.  Version is now
fully controlled from top-level wscript.  In addition to that, a new
NFD_VERSION_BUILD_STRING macro is set to include more detailed
information, including commit ID (e.g., "0.1.0-rc1-1-g5c86570").

Change-Id: I448eb627e0c42dc814de1107cf7bb0dc94fa2a89
Refs: #1575
diff --git a/tools/nfd-stop.sh b/tools/nfd-stop.sh
index c0b46bd..ed55929 100755
--- a/tools/nfd-stop.sh
+++ b/tools/nfd-stop.sh
@@ -1,4 +1,24 @@
 #!@BASH@
 
+VERSION="@VERSION@"
+
+case "$1" in
+  -h)
+    echo Usage
+    echo $0
+    echo "  Stop NFD and RIB Management daemon"
+    exit 0
+    ;;
+  -V)
+    echo $VERSION
+    exit 0
+    ;;
+  "") ;; # do nothing
+  *)
+    echo "Unrecognized option $1"
+    exit 1
+    ;;
+esac
+
 sudo killall nrd
 sudo killall nfd