ERP5Type: reduce usage of immediate reindexation, light indexation rework in ZSQLCatalog
There are two rather independent changes here, both touching indexation:
- Simplifying indexation code in ZSQLCatalog, fixing indexation activity failure when the same document is present twice in a single indexation call (happens when CMFActivity does not merge all indexation calls for a given document, which is not a bug but merely a minor lack of optimisation).
- Reduce calls to immediate reindexation, by forbidding its use from restricted python. Immediate reindexation is generally dangerous, as it can desynchronise catalog with ZODB because of race-conditions between ZODB and SQL databases, and differences in the way both handle conflicts.
I have more indexation work queued, that I intend to submit by chunks to avoid monter-merge-requests that no-one can review.