Implement WindowEventHandlers

Spec: http://whatwg.org/html#windoweventhandlers

This is mostly refactoring, but there are Web-facing changes for
onmessage, onpageshow and onpagehide, which were not correctly handled.

Drop the "Not implemented yet" blocks. onafterprint and onbeforeprint
are listed in WindowEventHandlers.idl, while onredo and onundo are
not in the spec.

BUG=305112

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

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