update package:chrome; listen for window close events

Address the window close issue, in as much as we can. package:chrome has been patched to listen for window events on the right object. We had to add a way to manually override the code generated from the idl.

Our code's been updated to listen on the window object. @ussuri