[backup] Split database module
Summary:
ENG-4380
No code changes, just separating code so it's easier to parse.
Test Plan: cargo check
Reviewers: bartek, patryk, kamil, jon
Reviewed By: bartek
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D8953