Remove the window listener on tear-down.
Handle unload as well as hide, as some devices use one and some the other
If both unload and hide occur (in either order) the first one handled removes the event listener for the second, and so the _onWindowHide method is not called for a second time even if both are emitted by the device.