Move close events handling higher up

Handling of close events in the main event loop reduces noise in the
states' event handling.
Merge World and Game structs