Refactor WebSocket handshake helpers into base class.

Refactor helper functions shared by WebSocketBasicHandshakeStream and
WebSocketHttp2HandshakeStream from anonymous namespace into
WebSocketHandshakeStreamBase as static methods, protected if only used
by derived classes, public if used by other helper functions remaining
in anonymous namespace.

Also remove out-of-line WebSocketHandshakeStreamBase constructor and
destructor and remove obsolete comment, as WebSocket is not compiled on
iOS.

Also remove kSecWebSocketProtocolLowercase and
kSecWebSocketExtensionsLowercase.  There is no need for these because
HttpResponseHeaders::EnumerateHeader() is case-insensitive.

This is a follow-up to
https://crrev.com/c/926769/2/net/websockets/websocket_http2_handshake_stream.cc#61

Bug: 801564
Change-Id: I0afdc5c66f743af4df8a1b7151b40e7a8e08e8bd
Reviewed-on: https://chromium-review.googlesource.com/949282
Reviewed-by: Adam Rice <ricea@chromium.org>
Commit-Queue: Bence Béky <bnc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541084}
8 files changed