Implement new stop reason for maybe abandoned jobs

Jobs timed out and detected as "Abandoned" jobs will be reported as a
new stop reason.

The new stop reason is `STOP_REASON_TIMEOUT_ABANDONED`. It will be used
to indicate that a job was terminated by the Job Scheduler because it
was detected as being abandoned and it used up its maximum execution
time.

Abandoned jobs are those that do not call `jobFinished()` or return
`false` on `onStartJob()` to finish the active job before the strong
reference to `JobParameters` is lost. These can potentially be running
nothing while the wakelock is being held, which can have a negative
affect on battery life.

bug: 372529068
Test: atest CtsJobSchedulerTestCases
Test: atest FrameworksMockingServicesTests
Flag: android.app.job.handle_abandoned_jobs

Change-Id: I5a538b7d454ae33e371e43e3afd5e85c87b4d26e
3 files changed