[GCM] Add heartbeat manager and reconnection logic due to heartbeat failure

The heartbeat manager maintains the heartbeat timer, handles heartbeat
interval updates from the server, and automatically triggers connection resets
if the heartbeat isn't properly acknowledged in a timely manner.

Also fixes an issue in reconnection where the client socket handle doesn't deal
well with a connection reset due to passing ownership of the socket.

BUG=284553

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242848 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 242848
Recreate the compositor when we receive the target HWND from the metro viewer process on Windows 8 ASH.

This ensures that the compositor paints on the correct surface.

Fixes a regression which occurred after the latest aura refactoring changes. This resulted in nothing painting
in Windows 8 ASH.

Ben's change to address the metro painting issue was reverted on Dec 20th due to ash_unittest crashes.

This fix works well with the ash_unittests and regular Chrome code path.

BUG=330179
R=cpu@chromium.org, cpu
TBR=beng

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

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