Make SharedBuffer support purgeable memory in-place.                                                                                                                                                                                                                                                                           

This CL adds a createPurgeable() static factory method as well as lock() and 
unlock() methods to SharedBuffer so that |Resource::m_data| can be allocated in
purgeable memory from the start.

Note that only the flat buffer (|SharedBuffer::m_buffer|) is made purgeable for 
now since the segments usually get merged anyway into that buffer (modulo
images which will have to be addressed in a follow up CL).

This removes in particular a memcpy() that we were doing in
Resource::makePurgeable() which will be needed to increase the usage of
Resource::makePurgeable().

Since Resource and SharedBuffer were the only clients using PurgeableBuffer
this CL also removes PurgeableBuffer to avoid unnecessary layering.

BUG=290193

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

git-svn-id: svn://svn.chromium.org/blink/trunk@167727 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Avoid calling Node::numberOfScopedHTMLStyleChildren() to check for existence

Avoid calling Node::numberOfScopedHTMLStyleChildren() to check for existence as
we don't want to traverse all children merely to check for the existence
of 1 child. Node::hasScopedHTMLStyleChild() can be used to check this instead
as we have a dedicated flag for this. Also, don't unnecessarily traverse all
children to set the HasScopedHTMLStyleChildFlag, and break early instead as
soon as one child is found.

R=adamk, eseidel

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

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