qt: fix interface window fullscreen state is not preserved between runs and interface window getting windowed just before closing
If the interface window is fullscreen and the application closes, upon next startup the interface does not get fullscreen again since the fullscreen state is not recorded because the interface window details are saved after the states are reset.
At the same time, the states should not be adjusted if the application is dying, I also take care of that so that the interface window does not change its state just before it is closed.
Request review @chub.