Miscellaneous cleanup in RollbackStore.

* Factor out code for reading and writing RollbackInfo from json.
* Make methods static where appropriate.
* Minor other cleanup.

In preparation for having RollbackData reuse RollbackInfo so we don't
end up with duplicate copies of PackageRollbackInfo for a rollback so we
can fix the bug when doing userdata restore for staged installs.

Test: atest RollbackTest
Bug: 124044231
Change-Id: I4f579393c1ffe8d519560ed223f61b002d730c50
1 file changed