Use a different approach to handling window events

One that's less scary, and allows immediate garbage collection
(rather than waiting up to 500 ms). Does not work in IE8, though.

Also shows editors as blurred when the window loses focus.