Optimize propagation of canvas invalidation rectangles to compositor.

The canvas element was propagating its invalidation region all
the way down to the compositor at every draw call in some cases.
This change batches the propagations to do it only once per script
execution task. There was already a TaskObserver in
RecordingImageBufferSurface. This change refactors it to make
HTMLCanvasElement a task observer instead. The the task observer
notification now flows from HTMLCanavasElement down to the ImageBuffer
and ImageBufferSurface, which is more natural because it follows object
ownership order.

BUG=399290

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

git-svn-id: svn://svn.chromium.org/blink/trunk@179637 bbb929c8-8fbe-4397-9dbb-9b2b20218538