Make WebGL use CanvasResource for submitting to OffscreenCanvas.

This CL is a step toward unifying the canvas and OffscreenCanvas
presentation code paths by making WebGL contexts use CanvasResource
to pass frames for OffscreenCanvases

This change revamps mechanisms for triggering calls to PushFrame()
The mechanisms was change to reference OffscreenCanvas object instead
of rendering contexts.  This fixes a destruction race condition where
redereng contexts were failing to de-register themselves when their
host is disposed first.  We also stop requesting BeginFrames in
OffscreenCanvasDidDraw in cases where the draw happens from within
a rAF callback on a worker.

BUG=788439
TBR=zmo@chromium.org
NOTRY=true

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_layout_tests_slimming_paint_v2;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I36965c4a0a892484a9ede966b268c91c7a34548f
Reviewed-on: https://chromium-review.googlesource.com/1135637
Commit-Queue: Justin Novosad <junov@chromium.org>
Reviewed-by: Justin Novosad <junov@chromium.org>
Reviewed-by: Fernando Serboncini <fserb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576154}
19 files changed