Fix a crash in content-shell headless mode with --dump-render-tree

Currently the platform specific state is not cleanedup in headless mode and
that leads to a crash upon content-shell exit.

This patch deinitialize the platform specific state by calling PlatformExit()
just before discarding the main window so that it will delete the compositor
on exit.

BUG=338919

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249678 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 249678
Revert of Do not force scrollbar update if parameters didn't change. (https://codereview.chromium.org/138013006/)

Reason for revert:
Seems to be responsible for fast/text/descent-clip-in-scaled-page.html failure. See http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Mac10.7/builds/22783 

Original issue's description:
> Do not force scrollbar update if parameters didn't change.
> 
> BUG=341145
> NOTRY=true
> 
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=249567

TBR=aelias@chromium.org,anton@google.com,anton@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=341145

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

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