Refactor odrefresh to fix bugs.

After the refactoring, the code is less error-prone. The same code
structure can be kept when we move to using OatFileAssistant.

Bug: 272245228
Test: atest odsign_e2e_tests_full
Change-Id: I2414dd68cc60c73d17c02fc1ad9d7fa67a52c93f
3 files changed