Remove regex uses in event service and consolidate

As the patch at
https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/50994 can attest,
parsing urls with a regex is error prone.  We should avoid it where
possible, and we have boost::urls that implements a full, correct, and
unit tested parser.

Ideally, eventually this helper function would devolve into just the
parse_uri, and setting defaults portion, and we could rely on the
boost::urls::url class to pass into things like http_client.

As a side note, because boost url implements port as a proper type-safe
uint16, some interfaces that previously accepted port by std::string&
needed to be modified, and is included in this patch.

Also, once moved, the branch on the ifdef for HTTP push support was
failing a clang-tidy validation.  This is a known limitation of using
ifdefs for our code, and something we've solved with the header file, so
move the http push enabler to the header file.

Also note that given this reorganization, two EXPECT statements are
added to the unit tests for user input behaviors that the old code
previously did not handle properly.

Tested: Unit tests passing

Ran Redfish-Event-Listener, saw subscription create properly:
Subcription is successful for https://192.168.7.2, /redfish/v1/EventService/Subscriptions/2197426973

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ia4127c6cbcde6002fe8a50348792024d1d615e8f
diff --git a/include/async_resolve.hpp b/include/async_resolve.hpp
index 7387f4d..87f53a0 100644
--- a/include/async_resolve.hpp
+++ b/include/async_resolve.hpp
@@ -26,7 +26,7 @@
     Resolver& operator=(Resolver&&) = delete;
 
     template <typename ResolveHandler>
-    void asyncResolve(const std::string& host, const std::string& port,
+    void asyncResolve(const std::string& host, uint16_t port,
                       ResolveHandler&& handler)
     {
         BMCWEB_LOG_DEBUG << "Trying to resolve: " << host << ":" << port;
@@ -78,19 +78,8 @@
                         handler(ec, endpointList);
                         return;
                     }
-                    uint16_t portNum = 0;
-                    auto it = std::from_chars(
-                        // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-pointer-arithmetic)
-                        port.data(), port.data() + port.size(), portNum);
-                    if (it.ec != std::errc())
-                    {
-                        BMCWEB_LOG_ERROR << "Failed to get the Port";
-                        handler(ec, endpointList);
-                        return;
-                    }
-                    endpoint.port(portNum);
-                    BMCWEB_LOG_DEBUG << "resolved endpoint is : "
-                                     << endpoint.address().to_string();
+                    endpoint.port(port);
+                    BMCWEB_LOG_DEBUG << "resolved endpoint is : " << endpoint;
                     endpointList.push_back(endpoint);
                 }
                 // All the resolved data is filled in the endpointList