Fix persisted job handling in bad-boot-RTC situations

Persisted jobs were inadvertently being discarded rather than
rescheduled with appropriate time constraints.  The underlying
bug is that the cancel-with-replacement code path was failing
to manage the replacement properly, and the other code path
leading to it was working around the bug by explicitly
rescheduling the job following cancellation.

Test: atest CtsJobSchedulerTestCases
Bug: 114292041
Bug: 117346686
Change-Id: I3a77e8a38c2f7028b61791bafd9c88b7a714ff6d
(cherry picked from commit 1603204ba5392d375e05ecf2c5b2fea7309f4cf1)
1 file changed