Feature/#457 remember window state

Based on https://github.com/spritebuilder/SpriteBuilder/pull/457.
Fixes https://github.com/spritebuilder/SpriteBuilder/issues/40.