WebSocket: Enable to run safe browsing checks for WebSocket from worker threads

This is a preparation CL for enabling to establish WebSocket connections off the
main thread.

Before this CL, WebSocketSafeBrowsingThrottle is created by
ChromeContentRendererClient::CreateWebSocketHandshakeThrottle(). This prevents
the off-main-thread WebSocket because the function is bound with the main thread
(render thread) and the throttle cannot be created from both the main thread and
worker threads.

To avoid it, this CL makes a new path to create the throttle in a thread-safe
way. Specifically, this introduces WebSocketSafeBrowsingThrottleProvider that is
created on the main thread, passed to a worker thread, and then provides the
throttle on the thread. DocumentWebSocketChannel[*] accesses the throttle
provider via FrameFetchContext/WorkerFetchContext.

After this CL, WebSocket for Document and DedicatedWorker go through the new
path by default. However, WebSocket for SharedWorker and ServiceWorker still go
through the old path via WorkerShadowPage. This will be switched to the new path
when the runtime flag is enabled.

In addition, to test the new path, this CL makes
safe_browsing_service_browsertest run with the off-main-thread WebSocket flag.

[*] Although it's prefixed with "Document", DocumentWebSocketChannel is used for
workers when the off-main-thread WebSocket is enabled. It'll be renamed to
WebSocketChannel etc after the new architecture is enabled by default.

Change-Id: If9e64e3291ab86ee4c836a66afede1fde9b24789
Bug: 825740
Reviewed-on: https://chromium-review.googlesource.com/985334
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Jialiu Lin <jialiul@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550530}
49 files changed