Optimize instance queries in compute manager

Some instance queries against the db through the conductor can be
optimized to return a reduced set of instances as needed for the job
at hand. Most of these are part of periodic tasks, so the win is
kind of big.

Compute methods where queries can be made more efficient:

_get_instances_on_driver
_poll_rebooting_instances
_poll_rescued_instances
_reclaim_queued_deletes
_run_image_cache_manager_pass

Resolves bug 1169970.

Change-Id: I7c2fab48944e34765b3fff8ce10bc64a5cd826c8
Remove locals() from nova/cells/*

Remove use of locals() from nova/cells/* to satisfy pyflakes, etc.

Change-Id: If430226b84ce1fa974771ea1ed5b8d50480a70c0
Merge "Optimize instance queries in compute manager"
Merge "Remove locals() from nova/cells/*"