add delay to autosave in beforeunload

allows forceful 'discard changes' by reloading the page and dismissing the warning,
which @fperez really wanted today.