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
TBR=pfeldman

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

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228473 0039d316-1c4b-4281-b951-d872f2087c98
Schedule an ephemeral profile for deletion once the last browser is closed.

BUG=302461
TEST=browser_tests
TEST=Manual:Set the ephemeral cloud policy on a profile and make sure the profile is deleted when Chrome is closed.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228474 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 228473
Add test where manager for supervised user is the owner of device

BUG=265589
TBR=ygorshenin@chromium.org

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

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