[web] start using threads from database
Summary:
- Migrate threads to DB when needed
- Use threads from DB and avoid fetching from keyserver when data is present.
Depends on D9956
Test Plan:
Test plan was done twice, in Chrome and Safari:
- Check if migrating works
- Check if threads are not fetched from keyserver when there are in DB
- Modify thread and reload app
- Modify thread on different account
- Close app, modify thread on different account and open app (test if checkpointing works)
I tested this on the account with ~4k threads, I didn't notice any perf downgrade, moreover, I think initial app load was faster when reading threads from DB.
Reviewers: tomek, michal
Reviewed By: tomek
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D9959