service worker: Create timeout timer immediately after context creation

Before this CL ServiceWorkerTimeoutTimer was created in
SendWorkerStarted() which is an async task scheduled after script
evaluation. This meant that there was a timing where the timeout timer
wasn't created yet but ServiceWorkerContextClient::WillStartTask() tried
to use the timer. This CL moves creation of the timer immediately after
context creation to avoid such situation.

Bug: 928568
Change-Id: I937a6595372d518f448f1112df963cd7a2bb34bc
Reviewed-on: https://chromium-review.googlesource.com/c/1466166
Commit-Queue: Kenichi Ishibashi <bashi@chromium.org>
Reviewed-by: Makoto Shimazu <shimazu@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#631529}
5 files changed