Move schema model into its own library

There's little point in bundling Schema's (the abstract class) symbols
in a library which contains code which uses them. It will break with a
cyclic dependency when we add an implementation of this interface into
other libraries.

I'm also removing some duplicate definitions.

Change-Id: I89dfa4d29164e5a54b1567f6fa091f53e0d520f8
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d4f0d5d..5928c0e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -57,9 +57,13 @@
 # we don't need filename tracking, and we prefer to use header-only Boost
 add_definitions(-DBOOST_SPIRIT_X3_NO_FILESYSTEM)
 
-add_library(parser STATIC
+add_library(schemas STATIC
     src/static_schema.cpp
     src/schema.cpp
+    )
+target_link_libraries(schemas PUBLIC Boost::boost)
+
+add_library(parser STATIC
     src/parser.cpp
     src/ast_commands.cpp
     src/ast_path.cpp
@@ -67,7 +71,7 @@
     src/parser_context.cpp
     src/interpreter.cpp
     )
-target_link_libraries(parser Boost::boost)
+target_link_libraries(parser schemas)
 
 add_executable(netconf-cli
     src/main.cpp