Rework absolutePathFromCommand

The problem with absolutePathFromCommand was that in its template
version, it could only work with some types of paths, and if the
template didn't match, another overload was used. This means that any
change to path processing would need to be done more times.

A new function called toCanonicalPath now works with all types of paths.

Also fixes a bug, where ".." is not properly resolved in paths.

Issue: https://tree.taiga.io/project/jktjkt-netconf-cli/issue/177
Change-Id: I85f2eb4ba2bccaeb996cd60d47dac0ae1a6b43a3
diff --git a/src/interpreter.hpp b/src/interpreter.hpp
index bd90a60..67940c8 100644
--- a/src/interpreter.hpp
+++ b/src/interpreter.hpp
@@ -29,12 +29,14 @@
     void operator()(const move_& move) const;
 
 private:
-    template <typename T>
-    std::string absolutePathFromCommand(const T& command) const;
-    std::string absolutePathFromCommand(const get_& command) const;
-    std::string absolutePathFromCommand(const describe_& describe) const;
     std::string buildTypeInfo(const std::string& path) const;
 
+    template <typename PathType>
+    std::string toCanonicalPath(const boost::optional<PathType>& path) const;
+
+    template <typename PathType>
+    std::string toCanonicalPath(const PathType& path) const;
+
     Parser& m_parser;
     DatastoreAccess& m_datastore;
 };