Move to file_body in boost

As is, it reads the whole file into memory before sending it.  While
fairly fast for the user, this wastes ram, and makes bmcweb less useful
on less capable systems.

This patch enables using the boost::beast::http::file_body type, which
has more efficient serialization semantics than using a std::string.  To
do this, it adds a openFile() handler to http::Response, which can be
used to properly open a file.  Once the file is opened, the existing
string body is ignored, and the file payload is sent instead.
openFile() also returns success or failure, to allow users to properly
handle 404s and other errors.

To prove that it works, I moved over every instance of direct use of the
body() method over to using this, including the webasset handler.  The
webasset handler specifically should help with system load when doing an
initial page load of the webui.

Tested:
Redfish service validator passes.

Change-Id: Ic7ea9ffefdbc81eb985de7edc0fac114822994ad
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/src/json_html_serializer.cpp b/src/json_html_serializer.cpp
index 405061b..8322f1d 100644
--- a/src/json_html_serializer.cpp
+++ b/src/json_html_serializer.cpp
@@ -562,8 +562,10 @@
 
 void prettyPrintJson(crow::Response& res)
 {
-    json_html_util::dumpHtml(res.body(), res.jsonValue);
+    std::string html;
+    json_html_util::dumpHtml(html, res.jsonValue);
 
+    res.write(std::move(html));
     res.addHeader(boost::beast::http::field::content_type,
                   "text/html;charset=UTF-8");
 }