[23.10 Desktop] Add a feature to automatically periodically re-optimize FSRS parameters

I think that we can simplify this suggestion. We don’t really need to check whether any review was done or not.

Simplified version of the suggestion:

During the sync, if there is a sync conflict in a card, recalculate the values of memory states, desired retention and decay for that particular card (after the sync of all the other data such as revlogs, deck configs, etc. is completed).

Rationale:
Sync conflict in a card can be caused by doing one or more of the following on two or more devices:

  • changing decks (which changes did)
  • reviewing
  • rescheduling
  • optimizing

All of these except rescheduling affect the memory states, desired retention or decay. So, it is better to recalculate these values.

Relevant code: add_or_update_card_if_newer in rslib/src/sync/collection/chunks.rs

Possible implementation:
Modify the add_or_update_card_if_newer function to return a list of cids where a conflict was detected and recompute the values in those cards after all the other parts of the collection are synced.