Move dex2oat invocation to common header

dex2oat_test is becoming overly complex with a huge number of tests.
In order to reduce the complexity in preparation for new tests,
move the common dex2oat invocation to the shared header.

Test: gtest
Bug: 112285035
Change-Id: I741ef3e78f7eb4302d786feb53b5fd90b63dcf94
2 files changed