2D canvas: fix shadow rendering of image and text with compositing modes that require temp layers

https://codereview.chromium.org/658603002 fixed only rendering of rect and path.

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

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

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