online / offline events should be attached to window

https://github.com/blackberry/BB10-WebWorks-Framework/issues/551