Use CDTFetchChanges to update old-style indexes
Use CDTFetchChanges to update old-style indexes

This patch updates CDTIndexManager to use the CDTFetchChanges
class to find out what's changed in the database. This class is
guaranteed to return the appropriate revision for indexing, and
separates out deletions enabling them to be handled separately.

BugId: 45846

jimix/CDTDatastore,jimix/CDTDatastore,jhs/CDTDatastore,cloudant/CDTDatastore,phatblat/CDTDatastore,jhs/CDTDatastore,phatblat/CDTDatastore,cloudant/CDTDatastore,jhs/CDTDatastore,jimix/CDTDatastore,phatblat/CDTDatastore,cloudant/CDTDatastore,cloudant/CDTDatastore