Use NSWindowRestoration for restoring state. Switch to using a XIB for the base -init because programatically creating windows messes up the restorable state. Fixes to window frame autosave restoration.