Add open method to windows

This becomes the opposite of close, similar to how show and hide work
together. show is no longer part of the window managers public API, it's
now open. This gives us the possibility to run code the first time a
window is shown.

After an idea of @myrdd.
Make pause & resume work correctly

Pause the game when the pause menu is open.

Fixes #2211