DevTools: Fix shared/service workers debug on start and restart behavior.

This patch makes inspector frontend connect to shared/service worker renderer before the shadow page starts loading.
This way we could ensure that we receive frameNavigated event on reattach.
This patch also fixes the code that pauses javascrit on worker thread when the debug on start option is set.
The frontend code is polished to hide all main thread artifacts in worker frontend.

BUG=412201, 404355

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182913 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix incorrect tooltip displayed for dock icon in "Dev Tools".

BUG=415494
R=dgozman@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@182914 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Simplify WTF Functional.h classes using variadic templates

SSIA. Using of variadic templates drastically reduces the code size in the Functional.h (-830 lines of code). 

The client code does not require any modifications.

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

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