Add API constraints to ScheduledJobStateChanged atom

This helps us know if jobs with a particular constraint are being
starved or otherwise dysfunctional due to a bug.

Test: make statsd_testdrive &&
./out/host/linux-x86/bin/statsd_testdrive 8

Sample output:
    atom {
      scheduled_job_state_changed {
        attribution_node {
          uid: 10224
          tag: ""
        }
        job_name: "android.jobscheduler.cts.jobtestapp/.TestJobService"
        state: SCHEDULED
        stop_reason: STOP_REASON_CANCELLED
        standby_bucket: RESTRICTED
        job_id: 691
        has_charging_constraint: true
        has_battery_not_low_constraint: true
        has_storage_not_low_constraint: false
        has_timing_delay_constraint: false
        has_deadline_constraint: true
        has_idle_constraint: true
        has_connectivity_constraint: true
        has_content_trigger_constraint: false
      }

Bug: 138239687
Change-Id: I175e5a0f5cc2cb3be447ccb58142006946092e75
5 files changed