Make OffscreenCanvas Transferable

At this moment, an offscreenCanvas could have an associated HTMLCanvasElement,
and we maintain a WeakPtr to that. Per discussion with esprehn@,
we change the strategy such that an offscreenCanvas holds a int which
is the DOMNodeId for its associated HTMLCanvasElement.

This change makes offscreenCanvas transferable much easier. In particular,
we just need to pass three int to deserializer, which are width, height
and DOMNodeId of for an offscreenCanvas.

A kayout test is included to test its correctness. The layout test
includes several things:
1). Transfer an offscreenCanvas to worker and transfer it back to main,
the width and height attributes should not change.
2). After transfer, the width/height should be 0.
3). Transfer a neutered offscreenCanvas should throw an exception.
4). After getting the offscreenCanvas back from the worker, call getContext('2d')
should work just fine.
5). Transfer an offscreenCanvas after calling getContext('2d')
should throw an exception.

BUG=563845

Review URL: https://codereview.chromium.org/1862033002

Cr-Commit-Position: refs/heads/master@{#388780}
29 files changed