[OT-PW] Support DocumentPaintDefinition for threaded worklet

In the current, non-threaded design, the DocumentPaintDefinition is
created in the global scope and passed to CSSPaintImageGeneratorImpl
where it is used directly from main-thread call-points. This doesn't
work for the threaded-worklet case, where the global scope runs on the
worklet thread.

Instead, the PaintWorkletProxyClient is responsible for gathering
and detecting incompatible definitions. Once a valid set of definitions
is received from all global scopes, a thread-safe version is created
(MainThreadDocumentPaintDefinition) and passed cross-thread to the
PaintWorklet instance on the main thread. That main thread version can
then be used for main-thread call-points (not done in this CL).

Bug: 946519
Change-Id: Ic150c42ae5d93610aec1e75ebf1117500441693b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1576501
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Reviewed-by: Xida Chen <xidachen@chromium.org>
Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#653375}
14 files changed