Refactor GraphicsLayer::setContentsToImage().

This has three parts:
1) setContentsToImage() uses setContentsTo() like setContentsToNinePatch(),
setContentsToCanvas(), and setContentsToMedia().
2) get rid of duplicated code to setContentsTo() in setContentsToImage().
3) remove unused ContentsLayerPurpose enum.

BUG=114658

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

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