[lib] Extract a function that runs the migrations
Summary:
This function will be used when restoring a backup.
https://linear.app/comm/issue/ENG-7009/run-redux-migrations-after-the-backup-is-restored
Depends on D12014
Test Plan: Kill the app, add a migration, start the app and check the logs to see if the migration was run.
Reviewers: kamil, marcin, varun
Reviewed By: kamil
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D12015