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/src/tree_schema_internal.h b/src/tree_schema_internal.h
index 2f5c063..2ef0817 100644
--- a/src/tree_schema_internal.h
+++ b/src/tree_schema_internal.h
@@ -15,6 +15,11 @@
 #ifndef LY_TREE_SCHEMA_INTERNAL_H_
 #define LY_TREE_SCHEMA_INTERNAL_H_
 
+#include <stdint.h>
+
+#include "set.h"
+#include "tree_schema.h"
+
 #define LOGVAL_YANG(CTX, ...) LOGVAL((CTX)->ctx, LY_VLOG_LINE, &(CTX)->line, __VA_ARGS__)
 
 /* These 2 macros checks YANG's identifier grammar rule */