Suppress multiple 'beforeunload' dialogs after a user clicks through one.

Currently, pages can make it difficult for a user to leave by popping up
multiple 'beforeunload' confirmation dialogs in response to a navigation
event. This patch addresses that by accepting a user's "Leave this page"
selection, and suppressing any further dialogs.

This patch is extracted from Brady Eidson's larger attempt to limit this
kind of abuse in some ways that Chrome has already addressed (see
ChromeClientImpl::shouldRunModalDialogDuringPageDismissal). It differs
a bit in the details (naming, etc.), but the intent is alignment with
https://bugs.webkit.org/show_bug.cgi?id=118871.

BUG=244804
R=jochen@chromium.org,japhet@chromium.org

Review URL: https://chromiumcodereview.appspot.com/19792003

git-svn-id: svn://svn.chromium.org/blink/trunk@154763 bbb929c8-8fbe-4397-9dbb-9b2b20218538