Improve test flakiness around FGS notifications

Make sure that even transient package-associated state is cleared when
the package is uninstalled, and provide a testing hook for instrumenting
global rate limits appropriately to high-rate test sequences.

Bug: 190019349
Test: atest CtsAppTestCases:android.app.cts.ServiceTest
Test: atest CtsAppTestCases:android.app.cts.NotificationManagerTest
Change-Id: Ic38157c6f21bcf09bcf74de591e41dc64f7bf0f7
4 files changed