Refactor the locking logic in Resource

This CL makes the logic for locking/unlocking Resources entirely reside in
Resource. This will simplify the use of purgeable memory for derived classes of
Resource.

BUG=

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

git-svn-id: svn://svn.chromium.org/blink/trunk@166704 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Convert remaining RenderSVG* nodes to RenderObject::isChildAllowed

Reland of:
r165851 (https://codereview.chromium.org/146833003) and
r166238 (https://codereview.chromium.org/136963005)

Performance issues should have been adressed by the latter.

BUG=337607

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

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