Cancel all jobs associated with a UID when appropriate.

Make sure we cancel all jobs scheduled by and for a UID when
an ephemeral, or otherwise restricted app, goes to the background or
when the user clears an app's data.

Also fix bug in FlexibilityController that looked at the scheduling
app's jobs instead of the source app's jobs.

Bug: 247808104
Test: atest CtsJobSchedulerTestCase
Change-Id: Iba2c371e0da642c5e59070fe25dd89c09db3b974
5 files changed