Fix STOREs that only mark as not dirty.
Fix STOREs that only mark as not dirty.

Our optimizations to avoid database writes if nothing has changed were
slightly too aggressive and also skipped changes that either only marked
an item as not dirty or only invalidated the cache.
(cherry picked from commit fa568a53148c31cc3118afb09be2552acd2f2feb)

kolab-groupware/akonadi,kolab-groupware/akonadi,kolab-groupware/akonadi,kolab-groupware/akonadi