Refactor KisMainWindow state serialization
Writes to window settings are centralized to saveWindowState(), and the group they are saved in is parameterized by a new field.