Remove nameStr from router

It isn't used anywhere in the code, so it can be removed, and the router
simplified.  These common data structures have caused problems, in that
they're not copied to child handlers, and cause bugs like #249.

Tested: Redfish service validator passes.  Basic sanity tests of both
static file routes such as $metadata (which use DynamicRule) as well as
method routes, such as /redfish/v1, return valid data.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I93ad74581912e18ee5db9aaa9ecdaf08ed765418
diff --git a/http/routing.hpp b/http/routing.hpp
index e73297c..18d3c2a 100644
--- a/http/routing.hpp
+++ b/http/routing.hpp
@@ -107,7 +107,6 @@
     std::vector<redfish::Privileges> privilegesSet;
 
     std::string rule;
-    std::string nameStr;
 
     std::unique_ptr<BaseRule> ruleToUpgrade;
 
@@ -390,13 +389,6 @@
         return *p;
     }
 
-    self_t& name(std::string_view name) noexcept
-    {
-        self_t* self = static_cast<self_t*>(this);
-        self->nameStr = name;
-        return *self;
-    }
-
     self_t& methods(boost::beast::http::verb method)
     {
         self_t* self = static_cast<self_t*>(this);
@@ -468,8 +460,7 @@
     {
         if (!erasedHandler)
         {
-            throw std::runtime_error(nameStr + (!nameStr.empty() ? ": " : "") +
-                                     "no handler for url " + rule);
+            throw std::runtime_error("no handler for url " + rule);
         }
     }
 
@@ -508,13 +499,6 @@
         return ret;
     }
 
-    template <typename Func>
-    void operator()(std::string name, Func&& f)
-    {
-        nameStr = std::move(name);
-        (*this).template operator()<Func>(std::forward(f));
-    }
-
   private:
     std::function<void(const Request&,
                        const std::shared_ptr<bmcweb::AsyncResp>&,
@@ -537,8 +521,7 @@
     {
         if (!handler)
         {
-            throw std::runtime_error(nameStr + (!nameStr.empty() ? ": " : "") +
-                                     "no handler for url " + rule);
+            throw std::runtime_error("no handler for url " + rule);
         }
     }
 
@@ -562,13 +545,6 @@
         handler = std::forward<Func>(f);
     }
 
-    template <typename Func>
-    void operator()(std::string_view name, Func&& f)
-    {
-        nameStr = name;
-        (*this).template operator()<Func>(std::forward(f));
-    }
-
     void handle(const Request& req,
                 const std::shared_ptr<bmcweb::AsyncResp>& asyncResp,
                 const std::vector<std::string>& params) override