Don't compile boot image if the process is not Zygote.

For other processes, in-memory compilation is not useful and probably
fails because they don't have the permission to invoke dex2oat.

Also added a runtime option "-Xallowinmemorycompilation". This can be
used by tests which are not Zygote but examines in-memory compilation.

Bug: 247055146
Test: m test-art-host-gtest-art_dex2oat_tests
Test: ArtGtestsTargetChroot
Change-Id: I179885ffd528ca6836bcba5006eaac6255e7f6ec
9 files changed