restore "unsaved changes" warning on unload

Autosave is triggered at this event, but it seems to fail sometimes (perhaps when it's too slow?).

closes #3475
update before unload message

mention pending autosave, if applicable
Merge pull request #3478 from minrk/rewarn

restore "unsaved changes" warning on unload