Use WorkerThreadTask for timer and idle notification in WorkerThread.

The shared timer and idle notification tasks don't need to execute once the stop() method has been called. This change ensures that by wrapping them up in WorkerThreadTask.
Also, the WorkerThreadTask::run method wasn't checking for valid WorkerGlobalScope. It is possible for a task to be posted to the message loop after the cleanup is posted, which results in a crash.

BUG=301515,399495

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

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