ART: Refactor dex2dex compilation

Refactor the code to tease out the dex2dex compilation flow. Use
templatized functions for common code.

Bug: 29089975
Test: m test-art-host
Change-Id: Ib31d491ed4676ae4cee9132ceb613a372fb06479
2 files changed