Rework ParserContext temporary list context path

This context path is used mainly for parsing list suffixes. The
implementation is kind of wonky, as list suffixes were implemented with
the old style of parsing paths, but it still worked even with the new
path parser. However, I want to implement the upcoming `move` command, I
need to parse suffixes outside the path parser. This means I need to
fill in this list context path before I parse these suffixes. The
problem was that this context path was designed so that it is easy to
fill in inside the path parser, but right now I want to use it outside
of it. Filling it in outside the path parser meant doing manual stuff to
the context path and... well, it was difficult.

The way it was done before this patch only really made sense with the
old style parsing, so one could also see this patch as eliminating
remnants of the old code. Also, this patch removes the need for
ParserContext::m_curModule, because it was only used in list suffix
parsing.

This change adds new overloads to the Schema class, obsoleting some
other ones. Right now, I want to implement the new feature, and I'm
going to be deleted unused/obsolete overloads in another patch.

Change-Id: I6264d8b4215fcbe12f79a089f199d53ebe86edbf
diff --git a/src/ast_handlers.cpp b/src/ast_handlers.cpp
index 24866b2..f160d8c 100644
--- a/src/ast_handlers.cpp
+++ b/src/ast_handlers.cpp
@@ -23,3 +23,8 @@
     }
     return leafDataToString(value);
 }
+
+boost::optional<std::string> optModuleToOptString(const boost::optional<module_> module)
+{
+    return module.flat_map([] (const auto& module) { return boost::optional<std::string>(module.m_name); });
+}