Update on-device AOT compilation to cover all cases.

After the change, odrefresh can properly determine whether to do
compilation when:
1. There is a mainline update (either a normal one or a samegrade one) that updates the ART module.
2. There is a mainline update (either a normal one or a samegrade one) that updates a module other than ART.
3. There is an OTA that updates a boot classpath jar.
4. There is an OTA that updates a system server jar.
5. There is no change since the last run.

Test: manual - 1. Install a mainline module without changing its
contents.
    2. Reboot the device.
    3. See if system_server components are recompiled.
Test: manual - 1. Do nothing and reboot the device.
    2. See if nothing is recompiled.
Test: atest odsign_e2e_tests
Test: atest art_odrefresh_tests
Bug: 189467174

Change-Id: I43dea5380fcd221d5d4e34753d64d46be4dbc27e
4 files changed