Clear historical record on all package uninstall broadcasts

When the last package is removed the uid removed signal can arrive
before which removes the UidState object from the data structure. This
caused the historical appops clearing call to never be made so the
registry is only correct during the first install.

Test: atests AppOpsTest --iterations 5, without then with the change.
Fixes: 333797941
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:7a23d1f7fa42026c5b3b15bc282851bf497d97b7)
Merged-In: If7cc71bec2c609aed501fc06c875f87c167cf521
Change-Id: If7cc71bec2c609aed501fc06c875f87c167cf521
1 file changed