Adds CDBFetchedResultsController and implements diff algorithm.