Add autosave support - version 1.1.1

Saves every 1000 turns and when Sn is pressed.
Code entirely jaakkos', used with permission.