SettingsBase: Make sure we save window state on quit or geometryChange
This change makes sure we save the window state settings when:
- Screen geometry changes, such as moving between two different screens
- When application is closed
This change makes sure we save the window state settings when: