Oilpan: We need to collect all garbage before shutting down the worker thread

- Before checking ASSERT(m_workerGlobalScope->hasOneRef()) at the end of worker thread execution, we need to collect all garbage. Specifically, we need to call Heap::collectGarbage() before the ASSERT. Note that we don't need to call V8's GC because wrappers of the worker thread are stored in DOMWrapperMap and they are already cleared in ~WorkerScriptController().

- The essential part of this CL is to add Heap::collectGarbage() before the ASSERT.

- This CL moves ThreadState::cleanup() into ThreadState::detach(), because cleanup() should be always coupled with detach().

- This CL adds Heap::collectAllGarbage() that calls Heap::collectGarabge() multiple times. Until we remove all persistent handles, we need to call multiple times to break persistent chains and collect all garbage.

BUG=340522
NOTRY=true

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

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