Fix issue #38244875: Bring back testChargingConstraintFails

It was flaky because we need to wait for the job scheduler
to get in to the charging/discharging state, since that happens
async from battery updates.

Also improve the tests to check more conditions, not wait an
absurd amount of time to see if the job runs (we can instead
mostly rely on the new get-job-state command), and have a few
check to see if their job is stopped when its constraints are
no longer satisfied.

Test: bit -t CtsJobSchedulerTestCases:*

Change-Id: Iecee36b9e6b3892d1b5d56807a6d6d1b0b848a76
5 files changed