Adds migrateResetFederationSyncForLegacyDms which resets last_synced_at=0 on all active federation peers so the S2S sync worker re-pulls all mutation log entries (including newly-backfilled legacy DMs) on next server startup. A legacy_dm_sync_done flag on instance_settings ensures this runs exactly once.