Remove internal locking from JobStatus.

Now all state of JobStatus is implicitly protected by the lock
of whoever is using it -- in this case the global lock for the
JobSchedulerService.  This allows us to remove all of the atomic
variables and just replace those with a simple bit field.

The required constraints for a job are now statically defined
once a JobStatus is created, and don't change.  (They wouldn't
change before, but now this is absolutely specified to be the
case.)  This required tweaking the constructors a bit so that
the earliest and latest run times are computed as part of the
core class initialization.

Also clarified methods on StateController that are called with
the lock held, and took advantage of that in the various
controllers to not now redundantly re-acquire the lock.

Change-Id: I595c5e7d1bff1bd2ff906d612581af82878a25ee
11 files changed