Set scan flags correctly for preloaded applications

Folowing scenario was observed:
1. Application build and installed without any native library
built inside it
2. In the next SW update the same application is built with
a native library bundled inside the apk.
When upgrading the SW, because SW update was not detected,
primaryCpuAbi was not set. This resulted in the system
not looking into the path derived from the ABI for native
libraries.

This happens becase of two reasons:
1. SCAN_FIRST_BOOT_OR_UPGRADE is not set because
PackageManagerService does not detect correctly update scenario.
2. SCAN_FIRST_BOOT_OR_UPGRADE is not added to mSystemScanFlags

Bug: 239073616
Test: will add ota test
Change-Id: I2ba73fcfcc46d7ddf14c2fb4dbf877f3252e7a50
Merged-In: I2ba73fcfcc46d7ddf14c2fb4dbf877f3252e7a50
2 files changed