Revert of Keep track in the browser of which frames have onunload and onbeforeunload handlers. (patchset #10 id:180001 of https://codereview.chromium.org/2783723002/ )

Reason for revert:
Exposed races with FrameHostMsg_DidStopLoading

BUG=710062

Original issue's description:
> Keep track in the browser of which frames have onunload and onbeforeunload handlers.
>
> This allows PlzNavigate to only pause fetching the request if it knows that the page has an onbeforeunload handler, where today it currently always goes to the renderer. This avoids delaying the network requests in the 95% cases that don't onbeforeunload handler on a process hop to the renderer.
>
> BUG=365039,705559
> CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
> [email protected], [email protected]
>
> Review-Url: https://codereview.chromium.org/2783723002 .
> Cr-Commit-Position: refs/heads/master@{#460581}
> Committed: https://chromium.googlesource.com/chromium/src/+/a2c84a7664eceb5cbeaae5bf1ec32da0060e3097

[email protected],[email protected]
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=365039,705559
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2812743002
Cr-Commit-Position: refs/heads/master@{#463510}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index dc437897..6c9c358 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1422,9 +1422,7 @@
 bool WebContentsImpl::NeedToFireBeforeUnload() {
   // TODO(creis): Should we fire even for interstitial pages?
   return WillNotifyDisconnection() && !ShowingInterstitialPage() &&
-         !GetRenderViewHost()->SuddenTerminationAllowed() &&
-         (GetMainFrame()->ShouldDispatchBeforeUnload() ||
-          GetMainFrame()->ShouldDispatchUnload());
+         !GetRenderViewHost()->SuddenTerminationAllowed();
 }
 
 void WebContentsImpl::DispatchBeforeUnload() {