Get rid of trailing slash saving

This m_trailingSlash was the source of bugs, so I got rid of it. A
caveat is that I lose this information if I want to recreate the path
back, but it isn't really too useful.

The actual bug was about conversion of the parsed path back to a string.
The problem was when the input had a trailing slash, the result string
would also have that trailing slash, which is undesirable (libyang
cannot deal with it).

This patch completely removes the information about the trailing slash,
so converting a *Path_ structure back to a string can't result with a
path that has a trailing slash.

However, I do think that there should be at least some sort of a test,
so the `cd` test converts paths back to strings and asserts that they
don't have trailing slashes.

Issue: https://tree.taiga.io/project/jktjkt-netconf-cli/issue/212
Change-Id: I08e02401580ce31c1e0412a5798cea20e7802ab4
diff --git a/src/ast_path.cpp b/src/ast_path.cpp
index 9c77f35..33b25fe 100644
--- a/src/ast_path.cpp
+++ b/src/ast_path.cpp
@@ -170,10 +170,9 @@
 
 schemaPath_::schemaPath_() = default;
 
-schemaPath_::schemaPath_(const Scope scope, const std::vector<schemaNode_>& nodes, const TrailingSlash trailingSlash)
+schemaPath_::schemaPath_(const Scope scope, const std::vector<schemaNode_>& nodes)
     : m_scope(scope)
     , m_nodes(nodes)
-    , m_trailingSlash(trailingSlash)
 {
     validatePathNodes(m_nodes);
 }
@@ -188,10 +187,9 @@
 
 dataPath_::dataPath_() = default;
 
-dataPath_::dataPath_(const Scope scope, const std::vector<dataNode_>& nodes, const TrailingSlash trailingSlash)
+dataPath_::dataPath_(const Scope scope, const std::vector<dataNode_>& nodes)
     : m_scope(scope)
     , m_nodes(nodes)
-    , m_trailingSlash(trailingSlash)
 {
     validatePathNodes(m_nodes);
 }
@@ -272,9 +270,6 @@
             res = joinPaths(res, (prefixes == Prefixes::Always ? path.m_nodes.at(0).m_prefix.value().m_name + ":" : "") + std::visit(nodeToDataStringVisitor(), it.m_suffix));
         }
     }
-    if (path.m_trailingSlash == TrailingSlash::Present) {
-        res += "/";
-    }
 
     return res;
 }