Refactor PrimaryDexOptimizer to prepare for secondary dex compilation.

This CL extracts common dex compilation logic into a base class
DexOptimizer, and only leave primary-dex-specific logic in
PrimaryDexOptimizer.

This is a no-op change. It only moves code around.

Bug: 249984283
Test: atest ArtServiceTests
Ignore-AOSP-First: ART Services.
Change-Id: Ifca8ef1f8079afb4d8ce0826f0f9e4c21c3ce1d8
10 files changed