Preserve window state between sessions [Closes #361]
Delay showing the window until document is fully loaded

This avoids showing the window before restoring previous session's window state
in order to prevent a weird resize animation.