Improve IMAP folder UIDVALIDITY change detection. Fixes #11807.

We stored the whole list of IMAP UIDs of a folder next
to every object. This turned out to be a major memory
and CPU time hog (see #11807).

Instead we detect a change of UIDVALIDITY at the
IMAP folder cache level (where it belongs) and pass
the information about a reset situation to the
history 'query' as additional parameter.
Full sync for the history database: Mark vanished entries as deleted
Update history instead of appending to it
Tie Kolab_Storage to Horde_History if enabled

Otherwise Kolab_Storage_Factory::createHistory()
will use the in-memory only Horde_History_Mock object.
Fix Kolab <-> Horde_History sync marker: The 'sync' timestamp must be per folder

Otherwise one folder overwrites the sync marker of other folders.

We need to keep our own timestamp since the sync of a folder cache
might be successful but the history sync could fail (timeout etc).
Adapt Kolab Horde_History unit test to new id prefixes
Test stale history cleanup on full history sync
New UT: Ensure history does not get polluted for unknown folder types
New UT: Ensure no 'delete' action gets issued on duplicate removal