Reland "Prevent renderer process flooding the browser with IPC."

History:
=======
 * Initial : https://chromium-review.googlesource.com/1230067
 * Revert  : https://chromium-review.googlesource.com/1265060
 * Reland  : This CL.

Cause of revert:
================
The tests depended on timing. On slow bots, it was failing.

Instead of checking the number of IPCs sent was below 100_IPC/10_s, the
new tests only check for the console error message to be displayed.
Since this is not possible to send a console message to a remote frame,
the last test has been removed.

Original description:
=====================

Some javascript function called in an infinite loop can cause the
browser process to be flooded by IPC and become unresponsive.

Limit the number of IPC sent to 10 per second per frame.

This was already done for:
 - history.pushState()
 - history.replaceState()

This is extended to:
 - history.back()
 - history.forward()
 - history.go()
 - navigations...

3 tests added.

R=clamy@chromium.org
TBR=palmer@chromium.org,dcheng@chromium.org

Bug: 882238
Change-Id: Iacab2f76dffa889bfd508fedf47f6e840627dbc7
Reviewed-on: https://chromium-review.googlesource.com/c/1268016
Reviewed-by: Nasko Oskov <nasko@chromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzogni@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604305}
25 files changed