tests CHANGE speedup building

Instead of including C source files and bilding each test from the
sources, use shared library objects and link them into the resulting
test executable.

Maintaining list of included C source files was unmaintainable with the
increasing number of source files and dependencies between them.
diff --git a/tests/src/test_hash_table.c b/tests/src/test_hash_table.c
index 9ec8a0b..adececa 100644
--- a/tests/src/test_hash_table.c
+++ b/tests/src/test_hash_table.c
@@ -15,19 +15,6 @@
 #include "common.h"
 
 #include "tests/config.h"
-#include "../../src/common.c"
-#include "../../src/compat.c"
-#include "../../src/set.c"
-#include "../../src/log.c"
-#include "../../src/xpath.c"
-#include "../../src/hash_table.c"
-#include "../../src/parser_yang.c"
-#include "../../src/context.c"
-#include "../../src/tree_schema_helpers.c"
-#include "../../src/tree_schema_free.c"
-#include "../../src/tree_schema_compile.c"
-#include "../../src/tree_schema.c"
-#include "../../src/plugins_types.c"
 
 #include <stdarg.h>
 #include <stddef.h>
@@ -37,7 +24,9 @@
 #include <string.h>
 #include <stdio.h>
 
-#include "libyang.h"
+#include "../../src/hash_table.h"
+
+struct ht_rec *lyht_get_rec(unsigned char *recs, uint16_t rec_size, uint32_t idx);
 
 #define BUFSIZE 1024
 char logbuf[BUFSIZE] = {0};