Empty startup task queue when tasks run synchronously

Also empty it when a task fails, and ensure that callback is only
called once. Extend the tests to check all this.

TEST=content_unittests --gtest_filter='StartupTaskRunner*'
BUG=304108

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228010 0039d316-1c4b-4281-b951-d872f2087c98
[sync] Do not override user-initiated navigations when sync setup is abandoned

When the user abandons an in-progress first-time sync setup by
navigating to another webpage, we automatically sign out the user and
close the existing sync setup overlay. Unfortunately,
OptionsPage.closeOverlay has the side effect of navigating back to
chrome://settings, and this overrides the user-initiated navigation.

This patch adds code to SyncSetupOverlay to check if the sync setup page
is being closed, and if so, to not call OptionsPage.closeOverlay.

BUG=278030
TEST=Abandon first time custom sync setup by navigating away, and make
     sure you aren't redirected to chrome://settings. Also make sure that
     visiting a site like google.com, then going to chrome://settings/syncSetup,
     and then hitting the back button takes you back to google.com.
     to the sync settings page

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228011 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 228011
Abort prerenders if unused for being uncommitted.

This will avoid the problem, in most cases, where we prerender a login page,
don't commit fast enough, and then incorrectly use it after the user has
already logged in.

BUG=292121
TEST=PrerenderBrowserTest.PrerenderNoCommitNoSwap

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

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