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.hpp b/src/ast_path.hpp
index 8a86181..e7df783 100644
--- a/src/ast_path.hpp
+++ b/src/ast_path.hpp
@@ -114,11 +114,6 @@
     bool operator==(const dataNode_& b) const;
 };
 
-enum class TrailingSlash {
-    Present,
-    NonPresent
-};
-
 enum class Scope {
     Absolute,
     Relative
@@ -126,22 +121,20 @@
 
 struct schemaPath_ {
     schemaPath_();
-    schemaPath_(const Scope scope, const std::vector<schemaNode_>& nodes, const TrailingSlash trailingSlash = TrailingSlash::NonPresent);
+    schemaPath_(const Scope scope, const std::vector<schemaNode_>& nodes);
     bool operator==(const schemaPath_& b) const;
     Scope m_scope = Scope::Relative;
     std::vector<schemaNode_> m_nodes;
-    TrailingSlash m_trailingSlash = TrailingSlash::NonPresent;
     // @brief Pushes a new fragment. Pops a fragment if it's nodeup_
     void pushFragment(const schemaNode_& fragment);
 };
 
 struct dataPath_ {
     dataPath_();
-    dataPath_(const Scope scope, const std::vector<dataNode_>& nodes, const TrailingSlash trailingSlash = TrailingSlash::NonPresent);
+    dataPath_(const Scope scope, const std::vector<dataNode_>& nodes);
     bool operator==(const dataPath_& b) const;
     Scope m_scope = Scope::Relative;
     std::vector<dataNode_> m_nodes;
-    TrailingSlash m_trailingSlash = TrailingSlash::NonPresent;
 
     // @brief Pushes a new fragment. Pops a fragment if it's nodeup_
     void pushFragment(const dataNode_& fragment);
@@ -167,5 +160,5 @@
 BOOST_FUSION_ADAPT_STRUCT(module_, m_name)
 BOOST_FUSION_ADAPT_STRUCT(dataNode_, m_prefix, m_suffix)
 BOOST_FUSION_ADAPT_STRUCT(schemaNode_, m_prefix, m_suffix)
-BOOST_FUSION_ADAPT_STRUCT(dataPath_, m_scope, m_nodes, m_trailingSlash)
-BOOST_FUSION_ADAPT_STRUCT(schemaPath_, m_scope, m_nodes, m_trailingSlash)
+BOOST_FUSION_ADAPT_STRUCT(dataPath_, m_scope, m_nodes)
+BOOST_FUSION_ADAPT_STRUCT(schemaPath_, m_scope, m_nodes)