Prevent firing BeforeUnloadEvents re-entrantly

This can happen when an onbeforeunload listener calls window.close().

Have a re-entrant invocation pretend that the user blocked the navigation, so
that we can consistently obey the user's intent on the original invocation.

BUG=430507
TEST=http/tests/misc/reentrant-beforeunload.html

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

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