autosave plugin stores content only if it was really changed #6629

This fixes problematic behavior when editing text as described in bug #6629

Content was always auto-saved, which means if the editor is loaded with stored text from the server, eventually it would be auto-saved over any previous modifications that might exists, rendering the recovery button useless.

The solution is to auto-save only if the content was modified (editor is dirty).