build: Reviving support for precompiled headers

This commit also includes an update of ./waf, which has several
improvements.  In particular, clang++ is now default compiler on OSX
platform.

This commit also includes reorganization of tests. All unit tests are
now under tests/unit-tests and integrated tests are under
tests/integrated.  This change allows small compilation optimization,
partially related to precompiled headers.

Change-Id: I4c171c04d18e9cb83e461264a35b9ed85ea4d50e
diff --git a/wscript b/wscript
index 62743e0..ef522e9 100644
--- a/wscript
+++ b/wscript
@@ -50,7 +50,7 @@
     conf.check_cxx(lib='pthread', uselib_store='PTHREAD', define_name='HAVE_PTHREAD',
                    mandatory=False)
     conf.check_cxx(lib='rt', uselib_store='RT', define_name='HAVE_RT', mandatory=False)
-    conf.check_cxx(cxxflags=['-fPIC'], uselib_store='cxxstlib', mandatory=False)
+    conf.check_cxx(cxxflags=['-fPIC'], uselib_store='PIC', mandatory=False)
 
     conf.check_osx_security(mandatory=False)
 
@@ -116,21 +116,19 @@
         )
 
     libndn_cxx = bld(
-        features=['cxx', 'cxxstlib'], # 'cxxshlib',
+        features=['pch', 'cxx', 'cxxstlib'], # 'cxxshlib',
         # vnum=VERSION,
         target="ndn-cxx",
         name="ndn-cxx",
         source=bld.path.ant_glob('src/**/*.cpp',
                                    excl=['src/**/*-osx.cpp', 'src/**/*-sqlite3.cpp']),
+        headers='src/common-pch.hpp',
         use='version BOOST OPENSSL CRYPTOPP SQLITE3 RT PIC PTHREAD',
         includes=". src",
         export_includes="src",
         install_path='${LIBDIR}',
         )
 
-    if bld.env['WITH_PCH']:
-        libndn_cxx.pch="src/common.hpp"
-
     if bld.env['HAVE_OSX_SECURITY']:
         libndn_cxx.source += bld.path.ant_glob('src/**/*-osx.cpp')
         libndn_cxx.mac_app = True
@@ -184,7 +182,6 @@
     # Unit tests
     if bld.env['WITH_TESTS']:
         bld.recurse('tests')
-        bld.recurse('tests-integrated')
 
     if bld.env['WITH_TOOLS']:
         bld.recurse("tools")