Introduce Extend Service Worker Lifetime algorithm (#1010)
Introduce Extend Service Worker Lifetime algorithm
This replaces the steps that monkeypatched the extension of the service
worker's lifetime with an algorithm that is explicitly invoked after the
steps that dispatch the extendable events.
This also changes to use "create an event" algorithm in DOM spec.
This also adds an event as a param to Handle Functional Event.
Related issue: https://github.com/w3c/ServiceWorker/issues/931#issuecomment-248233338.