MDL-45781 quiz autosave: detect and report when the session is lost.

and also other errors.