Improve HttpHeaders in EventService

This commit moves the internal data structures to use
boost::beast::http::fields as its internal data structure.  fields is a
hyper-optimized map implementation for http headers, and has a lot of
nice escaping properties.  It is what boost::beast::http::request uses
under the covers, so this has some niceties in reducing the amount of
code, and means we can completely remove the headers structure, and
simply rely on req.  When this conversion was done, now the type safety
of the incoming data needs to have better checking, as loading into the
keys has new requirements (like values must be strings), so that type
conversion code for to and from json was added, and the POST and PATCH
handler updated to put into the new structure.

Tested:
curl -vvvv --insecure -u root:0penBmc
"https://192.168.7.2:443/redfish/v1/EventService/Subscriptions" -X POST
-d
"{\"Destination\":\"http://192.168.7.2:443/\",\"Context\":\"Public\",\"Protocol\":\"Redfish\",\"HttpHeaders\":[{\"Foo\":\"Bar\"}]}"
returned 200.

Tested various "bad" headers, and observed the correct type errors.

Issued: systemctl restart bmcweb.
Subscription restored properly verified with.
GET https://localhost:8001/redfish/v1/EventService/Subscriptions/183211400

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I331f65e1a3960f1812c9baac27dbdcb1d54f112c
diff --git a/include/event_service_store.hpp b/include/event_service_store.hpp
index 345b690..dcc99f1 100644
--- a/include/event_service_store.hpp
+++ b/include/event_service_store.hpp
@@ -1,6 +1,7 @@
 #pragma once
 #include "logging.hpp"
 
+#include <boost/beast/http/fields.hpp>
 #include <boost/container/flat_map.hpp>
 #include <nlohmann/json.hpp>
 
@@ -19,7 +20,7 @@
     std::vector<std::string> registryMsgIds;
     std::vector<std::string> registryPrefixes;
     std::vector<std::string> resourceTypes;
-    std::vector<nlohmann::json> httpHeaders; // key-value pair
+    boost::beast::http::fields httpHeaders;
     std::vector<std::string> metricReportDefinitions;
 
     static std::shared_ptr<UserSubscription>
@@ -146,13 +147,15 @@
                 const auto& obj = element.value();
                 for (const auto& val : obj.items())
                 {
-                    const auto value =
-                        val.value().get_ptr<const nlohmann::json::object_t*>();
+                    const std::string* value =
+                        val.value().get_ptr<const std::string*>();
                     if (value == nullptr)
                     {
+                        BMCWEB_LOG_ERROR << "Failed to parse value for key"
+                                         << val.key();
                         continue;
                     }
-                    subvalue->httpHeaders.emplace_back(*value);
+                    subvalue->httpHeaders.set(val.key(), *value);
                 }
             }
             else if (element.key() == "MetricReportDefinitions")