DevTools: support beforeunload lifecycle for DevTools window

This patch teaches DevTools window to send beforeunload events to
its frontend. This events won't be send if the inspected webcontents
got closed - additional work is needed to handle this case.

BUG=289552
R=bartfab@chromium.org, pfeldman@chromium.org, sky@chromium.org
TBR=pfeldman

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=228346

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=228473

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=228681

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228913 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 228913