More careful null checking and member initalization.
Remember window size.

Refs #154
Refactor saving of window geometry.

Closes #154
Rename settings key for window geometry.
Only save geometry when close event is accepted.
Merge remote-tracking branch: upstream/master