[native] Download and restore compaction
Summary:
Update the JS and Rust code to download and restore sqlite backup compaction. Logs will be handled later. After compaction and user keys are downloaded, the sqlite data is saved to a file and calls the C++ function with the path and the encryption key. After everything succeds it resolved the JS promise.
Depends on D10859
Test Plan:
- Enabled uploading backups
- Made a new draft
- Created a new compaction and waited for it to be successfuly uploaded
- Logged out
- Logged in, into the same account
- Checked that the draft wasn't there
- Restored from backup
- Restarted the app so redux would refresh
- Checked that the draft would be there
Reviewers: marcin, bartek, kamil
Reviewed By: marcin, kamil
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D10987