Attempt 2 at fixing crash in ProcessPendingTabs. This differs from the
one you reviewed in that I changed a DCHECK in ProcessPendingTabs to
an if. See the comments there for details (this was triggering a
failure on chromeos).

Description from last attempt:

With the current code, during closing a window with unload handlers if
a tab is disconnected then we delay cleanup by way of PostTask with
the tab being disconnected. During the time between when the
disconnect happens and the task is run the unloader handler sets still
maintain a reference to the tab. If ProcessPendingTabs is invoked
during this window and the tab is deleted, then we can crash.

I'm fixing it by making disconnect remove from the sets immediately,
but delay the call to ProcessPendingTabs. I'm also doing a similar
thing in TabDetachedAt.

BUG=15620
TEST=none

Review URL: http://codereview.chromium.org/6321001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71388 0039d316-1c4b-4281-b951-d872f2087c98
void Browser::OpenSyncMyBookmarksDialog() {
  sync_ui_util::OpenSyncMyBookmarksDialog(
      profile_, ProfileSyncService::START_FROM_WRENCH);
}

void Browser::OpenSyncMyBookmarksDialog() {
  sync_ui_util::OpenSyncMyBookmarksDialog(
      profile_, ProfileSyncService::START_FROM_WRENCH);
}
