Fix PurgeableBuffer implementation.

The current implementation was making isPurgeable() return true when the memory
was actually not purgeable.

PurgeableBuffer::isPurgeable() was returning whether the instance was unlocked
or purged which is incorrect.
Discardable memory should have only two states: locked or unlocked. Whether the
memory was purged or not is an extra information provided upon lock() but it
should not replace the lock state.

The problem happened whenever the memory was evicted upon a lock (i.e.
m_memory->lock() returns false) and the instance transitioned to the PURGED
state (which is wrong) as opposed to LOCKED.
Calling isPurgeable() after that didn't tell whether the memory was purgeable
(since it's always locked after a lock() hence not purgeable) but rather
whether it was purged before the last lock which is not something that a user
of the API would expect.

This also changes isPurgeable() to isLocked() to match the lock() method and
forces clients to check the return value of lock().

Also note that purgeable memory can be deleted no matter which state it's in
(locked vs unlocked) so there is no need to conditionally unlock it at
destruction time.

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

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