Fix app image class pruning in `CompilerDriver`.

Fix app image class pruning when loading image classes and
after verification and initialization. This is required to
keep `CompilerOptions::IsImageClass()` consistent with the
actual content of the app image produced by `ImageWriter`.
Flag a bug for `--initialize-app-image-classes=true` where
the inconsistency still remains.

Test: m test-art-host-gtest
Test: testrunner.py --host --optimizing --speed-profile
Bug: 38313278
Change-Id: I196d97c69bccb255fb3190a6b636596805ab55bd
11 files changed