Introduce KeepAliveWhilePending to ScriptPromiseResolverWithContext.

Some modules, for example WebMIDI and WebCrypto, needs "Async Initializer".
The initializer should stay alive until the initialization succeeds (i.e. the
associated Promise is resolved), the initialization fails
(i.e. rejected), or the associated ExecutionContext is stopped.
This CL introduces the the constructor mode ScriptPromiseResolverWithContext.
If KeepAliveWhilePending is specified, the created resolver stays alive while
one of the above conditions meets.
Each initializer can stay alive by inheriting ScriptPromiseResolverWithContext.

This CL rewrites WebMIDI and WebCrypto async operations with it.

BUG=361041

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

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176403 bbb929c8-8fbe-4397-9dbb-9b2b20218538
DevTools: Code fixes for the Closure compiler roll

R=aandrey, eustas, yurys

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

git-svn-id: svn://svn.chromium.org/blink/trunk@176404 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Encapsulate implementation-specific timeline record handling in TimelineUIUtils

TimelineUIUtils now has two descendants:
- TracingTimelineUIUtils for tracing based timeline records
- TimelineUIUtilsImpl for timeline records based on Timeline agent events
This patch moves some of UI-specific getters from TimelineModel.Record into TimelineUIUtils instance methods. In the end we should have all ui logic that depends on particular backend details to be encapsulated in TimelineUIUtils instance.

BUG=361045
R=caseq@chromium.org

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

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