Restore compaction on web. Because web keeps redux persist storage in the database, and native doesn't, we must also:
- save redux persist date before restoration
- put it back after it's restored
We can do that before applying logs, before we can be sure that they won't touch this table.
Moved a few persist constants to a new file because otherwise webworker imported something that used window, which isn't available there.
Depends on D11042