2D canvas: fix shadow rendering with compositing modes that require temp layers

For compositng mode that are known as "full canvas compositing modes",
i.e. modes that affect pixels outside of the primitive, we
need to draw to a temporary buffer, and composite it back to the
canvas.  In cases where shadows are being painted, it is important
to composite the shadow independently of the foreground to
produse spec-compliant behavior.

BUG=411316
TEST=layout test fast/canvas/canvas-shadow-source-in.html

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

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