Oilpan: Fix Resource-related unit test crashes in CachingCorrectnessTest, MemoryCacheTest, and ImageBitmapTest.

MemoryCache::m_liveResources is the main owner of Resource objects. If we
replace the global memory cache and the global memory cache is collected,
Resource objects are also collected unexpectedly even though their canDelete()
is false. So, replaceMemoryCacheForTesting should transfer m_liveResources of
the previous MemoryCache to the new one.

This CL also fixes additional problems.

* MemoryCacheTest.VeryLargeResourceAccounting
* MemoryCacheTest.DecodeCacheOrder
* ImageBitmapTest.ImageBitmapLiveResourcePriority
  Fix Resource leak. We need to unregister ResourceClient manually.

* RawResourceTest.DontIgnoreAcceptForCacheReuse
  Do not allocate garbage-collected object on stack.

BUG=393516

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

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