[CSS Shapes] CORS-enabled fetch for shape image values - ShapeInfo.cpp cleanups

> ShapeInfo<RenderType>::checkImageOrigin(const RenderType* renderer, const StyleImage* styleImage)

It's simpler and more straightforward to just pass a Document& to this (essentially private) function, instead of a renderer. Similarly, the second parameter can be an ImageResource&.

Currently a (static) copy of checkImageOrigin() is needlessly generated for each RenderType template instantiation. Replaced it with a global function called checkShapeImageOrigin().

Replaced the following test logic in checkImageOrigin with a short-circuit return:

> bool accessAllowed= styleImage->cachedImage()->isOriginClean(renderer->document().securityOrigin());
>    if (!accessAllowed) {
>       ...
>    }


BUG=312480

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

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