New and improved state restoration

Granular list of changes:

- No longer using NSWindowRestoration to restore the view controller
state. All data is written to NSUserDefaults. However,
NSWindowRestoration is still used for window-specific attributes like
the full screen state.
- View controller autosave state is now written much less frequently
(only when the window resigns key or the application is going to
terminate, instead of writing data every time the subview frames
changed)
- An index property has been added to FGOViewController. This is used
to provide autosave support for attached view controllers keyed by
index when they do not provide a unique identifier.