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.

(cherry picked from commit 7707aeaa92171bc34718ceaf0554e982d2e92729)

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