Only reset dirty state on successful xhr request
Evaluate autosave dirty state in anonymous function.

There's little point in duplicating the same onbeforeunload handler
so check whether the for is considered dirty for autosave.
It's worth noting that this is different from the existing publisher
notion of dirty which is only made true by the change event.
Autosave listens for keyup because an editor may leave the focus on the
same field for some time, the change event would not be fired in this
case.
Reset autosave dirty state when submitting the form
Rename autosave message css class
Remove quizzical comments