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-status-http-server.py b/tools/nfd-status-http-server.py
index 52acae6..6e0f167 100755
--- a/tools/nfd-status-http-server.py
+++ b/tools/nfd-status-http-server.py
@@ -164,8 +164,15 @@
                         help="Enable HTTP robots to crawl; disabled by default.")
     parser.add_argument("-v", default=False, dest="verbose", action="store_true",
                         help="Verbose mode.")
+    parser.add_argument("--version", default=False, dest="version", action="store_true",
+                        help="Show version and exit")
 
     args = vars(parser.parse_args())
+
+    if args['version']:
+        print "@VERSION@"
+        return
+
     localPort = args["port"]
     localAddr = args["addr"]
     verbose = args["verbose"]