midgardStorage: Fix inconsistent auto-save behavior

This change fixes a problem with the autoSave option in midgardStorage.
If a save was triggered and a change occured to an element currently
being saved, the element was removed from the changed models and the
change was not picked up. A version number that tracks the changes
on the model instance is introduced to keep the model as changed if a
subsequent change occured.