Restore main window before close if it's iconized

Closing the main window when it's iconized, leads to a meaningless size
and position being saved to the settings file. The easiest way round
this is to just restore the window before closing it.
Added proper handling of resize, move and maximize events

Added proper handling of Resize, Move and Maximise events to ensure that
the GUI behaves as expected.
update AUTHORS