Memory sync gains a slower 'off' retry mode with random delay when its data store is unusable
The background process that keeps memory in sync now checks whether any of its data stores has become unusable. When that happens, it switches into a new 'off' retry state: it counts the number of retries, computes a randomized delay before trying again (to avoid retries all happening at once), and records the reason as off_retry instead of the usual periodic sync reason. The interval between resync attempts is now computed by a new helper function.
This prevents memory sync from hammering a broken data store on a fixed schedule; instead it backs off with increasing, randomized delays until the store becomes usable again.