Fix profile guided compilation for secondaries and add more tests

The method signature for opening the reference profile was wrong
and did not account to the fact that the profile name can be
null for secondary dex files.

Also, add infrastructure to test dexopt for primary apks and add
an initial set of tests.

Test: installd_dexopt_test
Bug: 72666394
Change-Id: I537a3f52a1449a8edb070643500a4d241728cb9a
2 files changed