QWebSocket: fix quadratic copy and scan during pre-handshake
Just like the parent patch, but for the client-side.
Different from the patch addressing the server-side, we don't need
to store a QHash<socket, bytes> since there is only one peer.
And the client side was not affected by this until 6.3.
Amends bbd9f2f4f5e0fda85029fa320f793973ea607c2b.
[ChangeLog][QWebSocket] An over-sized handshake response now closes the
connection, and QWebSocket::closeCode() reports
QWebSocketProtocol::CloseCodeTooMuchData. The size limit is also now
applied as the response arrives, rather than only while the end of the
headers has not been seen.
Pick-to: 6.12 6.12.0 6.11 6.11.3 6.8 6.5
Fixes: QTBUG-150324
Change-Id: If1a12a6d87fe1a9af55282482da27aabca676d43
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>