[pm] send replaced broadcasts for reinstall after DELETE_KEEP_DATA

Such reinstallation should be considered as an app update with
"replace", not a "new install". This makes sure that other services
won't clean the data related to the existing package.

BUG: 288142708
BUG: 300314921

Test: atest
android.content.pm.cts.PackageManagerTest#testReinstallBroadcastsAfterDeleteKeepData
Test: will add more tests

Change-Id: I14341dc64640a0b2f4d434cef6936518f0be5f65
3 files changed