Tune http2 window and frame sizes

http2 maintains its own frame ACK window per stream.  While the defaults
work well in most cases, for large binary uploads, like Redfish
UpdateService, the relatively small default window size of 16KB leads to
slower performance than http1.  While it's not expected to see a
performance improvement, we would prefer to not see a regression for a
normal use case.

Update the HTTP2 max frame size to 16KB.  Setting the internal buffer to
the same size + the http2 header allows clocking in the entire frame in
one async read.  Note, setting the value higher than 16KB doesn't appear
to allow curl to send larger frames.

Also update the HTTP window size to 512KB, or 32 times the max frame
size. Note, all streams including the control stream are set to this
value, which, while somewhat arbitrary, allows for continued
UpdateService pushing without pauses for window ACK.

Tested:
POST /redfish/v1/UpdateService/update-multipart
Of an arbitrary 100MB file through curl shows that --http1.1 option and
--http2 option are within 5% of the same upload time.

Change-Id: I7ff6296a9cc0794aad63f5058620c0f1fb9299e3
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/http/nghttp2_adapters.hpp b/http/nghttp2_adapters.hpp
index ff5e708..15bde7c 100644
--- a/http/nghttp2_adapters.hpp
+++ b/http/nghttp2_adapters.hpp
@@ -173,6 +173,12 @@
                                        headers.size(), dataPrd);
     }
 
+    int setLocalWindowSize(uint8_t flags, int32_t stream_id, int32_t windowSize)
+    {
+        return nghttp2_session_set_local_window_size(ptr, flags, stream_id,
+                                                     windowSize);
+    }
+
   private:
     nghttp2_session* ptr = nullptr;
 };