ART: Add dex2oat swap-usage parameters
Make the dex2oat swap usage decision dependent on parameters that
can be changed on the command line. Both the dex file size and dex
file count can be modified through the following to new parameters:
--swap-dex-size-threshold
--swap-dex-count-threshold
The defaults remain the same (20MB and 2).
Factor out some dex2oat setup code from oat_file_assistant_test
and use it in a new dex2oat test.
Bug:
29557002
Change-Id: I8863224f0304c98afe251572ffda8c5b3ead735b
Test: m test-art-host-gtest-dex2oat_test
Test: m test-art-host-gtest-oat_file_assistant_test
Test: m test-art-host