build: add PCHs for ndnsec and unit tests, fine-tune the existing ones

A full debug+tests build now takes 10% less time with gcc-9 and 21% less
with clang-10. Release builds (without tests) are only marginally faster
with gcc and 7% faster with clang.

Change-Id: I494778fe44cecc6209819a49f48a03f4d16c36af
diff --git a/tests/unit/wscript b/tests/unit/wscript
index bc7ce0f..e91ac7f 100644
--- a/tests/unit/wscript
+++ b/tests/unit/wscript
@@ -1,6 +1,6 @@
 # -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*-
 
-top = '../..'
+top = '../../'
 
 def build(bld):
     configPath = 'UNIT_TEST_CONFIG_PATH="%s"' % bld.bldnode.make_node('tmp-files')
@@ -18,11 +18,13 @@
 
     bld.objects(target='unit-tests-objects',
                 source=srcFiles,
+                features='pch',
+                headers='unit-tests-pch.hpp',
                 use='tests-common',
                 defines=[configPath])
 
     # unit test binary
-    bld.program(target='../../unit-tests',
+    bld.program(target=top + 'unit-tests',
                 name='unit-tests',
                 source=['main.cpp'],
                 use='unit-tests-objects',