Refactor change queue.

Move most of the change queue logic into the model.  This should
be a little cleaner, and it should be easier to follow what
happens when a build is complete.

Run launch jobs over the whole queue.
Collapse addChange into the base manager.

Makes reading the logic around adding a change simpler.  Several
hooks are provided for the dependent manager subclass to extend
the method around dependent changes.

Move onbuildcompleted and reporting methods to base class.

Simplifies the code path when a build is completed.  Move to a
more generalized model where updates are applied to changes as
received, then search for changes ready to be reported, then
search for jobs that need to be launched.

Also,
 * test check queue functionality
 * assert all queues are empty at ends of tests
 * move formatting methods to pipeline/queue classes
 * add queue-only mode notification to status screen

Change-Id: I336ac289af6ebd23567ac54b359c9f38af7f2ac7
Reviewed-on: https://review.openstack.org/12277
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
4 files changed