Move restore logic into RestoreService.

This commit is messy and incomplete because I didn't realize how much
functionality was missing until now. I need to change some things before
finishing the restore functionality. Namely, I'm going to make a JSON
backup log that restore will read from, rather than from the db.
Add JSON backup log functionality.

This was messier than I wanted it to be. There's room for improvement in
the readability of the logic. My goal was to keep any of the backup
logic outside of CopyHandler which made some things less than intuitive.