WorkerThread's pointer should be protected until all the shutdown tasks are complete

During destruction of WorkerThread, m_pendingGCRunner is destroyed prior to m_thread,
because it is following it in the members ordering in the class.
So when m_thread is being destroyed, it is waiting for all the tasks on the message loop
to complete, some of which need the PendingGCRunner. This will cause use-after-free.

To prevent the situation, this CL adds code to keep the WorkerThread pointer alive
until we complete all the shutdown tasks.

BUG=400511
TEST=none (I cannot reproduce the crash)
R=ager@chromium.org, jochen@chromium.org, nasko@chromium.org, zerny@chromium.org

Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=179604

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

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