Remove beforeunload events.

R=abarth@chromium.org

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