Refactor argument parsing in ota preopt

Unify the parsing of all the versions. This will make it much
easier to extend the interface to accept new arguments.

Test: installd_otapreopt_test
Bug: 30934496
Change-Id: Idf945d3f4078b4ef86e2c2532b321768d2868fa7
2 files changed