Create an abstraction for dexopt tasks

Instead of letting odrefresh building dex2oat cmdline arguments, hide
the specifics of cmdline flags behind an API abstraction. The API
defines the only necessary parameters for the actual dexopt task (e.g.
compiling BCP extension, system server) to proceed. The introduced API
is private within ART.

libdexopt.so is created to contain the API and implementation. It is put
under art/artd/ in the sense that the future ART services can reuse and
evolve the code.

This change should not have any effective change to the compilation
results.  Given the large size of the change, the dex2oat cmdline is
purposely ordered in the same way as before.  The compiled artifacts
should not change at all.

Also, art_odrefresh_test is no longer built for the "second" ABI. This
is to make it consistent to odrefresh, so that we won't need to test
unused variation and build "second" for the dependencies.

Bug: 193668901
Test: 1. Revert this change, run `odrefresh --force-compile`, capture
         the checksum of all output files.
      2. Apply this change, repeat the same step.
      3. Saw all the file hashes remain the same (except for
         cache-info.xml where the timestamp changed).
Test: atest ComposHostTestCases
Test: atest odsign_e2e_tests
Test: atest art_standalone_odrefresh_tests
Test: art/build/apex/runtests.sh
Test: TH
Change-Id: I3404057050bc1ce6fce4f99cc5c9998e3d67808a
22 files changed