Add helper methods to parse config JSON.

This is a pure refactor for now, but prepares for the parser doing more
work to expand variant config.

Bug: 293289578
Test: atest cargo_embargo.test
Change-Id: Ibdeb516803046bed6c8eb63d877230acbadc7fa8
4 files changed