installd: move background compilation check out of RunDex2oat

This makes it easier to extract RunDex2oat to individual file for unit
test.

Bug: 161470356
Test: atest frameworks/native/cmds/installd/tests
Test: cmd package compile -m speed -f com.android.egg

Change-Id: I6df2b9efeadddee9a3de869a8cd4d4b3d27229d7
1 file changed