Fix the logic about re-compiling for boot image.

There were some logic errors in
`OatFileAssistant::ShouldRecompileForFilter` that triggered
recompilation after reboot and caused the artifacts generated by
otapreopt to be overwritten. This CL fixes the logic.

Bug: 294044824
Test: m test-art-host-gtest-art_runtime_tests
Test: -
  1. m dist
  2. system/update_engine/scripts/update_device.py out/dist/cf_x86_64_phone-ota-*.zip
  3. adb reboot
  4. See that UpdatePackagesIfNeeded doesn't recompile any package.
  5. Check that `adb shell dumpsys package dexopt` shows
     "reason=ab-ota".
Change-Id: Ie909190b8c790ec696d3e1a89e74ec18701fb16c
2 files changed