Merge pathToAbsoluteSchemaString and pathToSchemaString

These functions did almost the same thing, the only difference was that
the former inserted module prefixes everyhwere and the other didn't.
The new function takes an argument specifying whether to insert prefixes
everyhwere.

pathToSchemaString also checks whether a path is absolute or relative
and prepends a slash. This means, that it's no longer possible to
convert and absolute path to a string with no leading slash. The
StaticSchema class had to be changed accordingly, because it stored
absolute paths in strings without a leading slash (because it was
designed before absolute paths existed).

The fact that this was split into two functions helped find an error in
a later patch.

Change-Id: I6112cb5982919b51b61152f355771a52dd467c6e
diff --git a/src/yang_schema.cpp b/src/yang_schema.cpp
index 5de3b9e..06259b9 100644
--- a/src/yang_schema.cpp
+++ b/src/yang_schema.cpp
@@ -220,8 +220,7 @@
 
 libyang::S_Schema_Node YangSchema::getSchemaNode(const schemaPath_& location, const ModuleNodePair& node) const
 {
-    std::string absPath = location.m_nodes.empty() ? "" : "/";
-    absPath += pathToAbsoluteSchemaString(location) + "/" + fullNodeName(location, node);
+    std::string absPath = joinPaths(pathToSchemaString(location, Prefixes::Always), fullNodeName(location, node));
 
     return impl_getSchemaNode(absPath);
 }
@@ -321,8 +320,8 @@
     if (path.m_nodes.empty()) {
         nodes = m_context->data_instantiables(0);
     } else {
-        const auto absolutePath = "/" + pathToAbsoluteSchemaString(path);
-        const auto node = getSchemaNode(absolutePath);
+        const auto pathString = pathToSchemaString(path, Prefixes::Always);
+        const auto node = getSchemaNode(pathString);
         nodes = node->child_instantiables(0);
     }