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
Improve unit tests for DB archiving.

Test all tables that have a uuid column and no constraints that make
generic testing difficult, rather than just a couple of tables.

Make the teardown code more generic.

Add test_archive_deleted_rows_2_tables, which tests that we can
archive rows from two tables in one call.

Change-Id: If08aac3c6869820c72dfcb1bf6d22d19c2995c8a
Strip exec_dirs prefix from rootwrap filters

Make the rootwrap filters more portable by removing
the explicit exec_dirs prefix from them. This allows
a binary to be installed in any of the exec_dirs and
still be used by rootwrap, which improves cross-distro
portability.

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

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

Change-Id: If430226b84ce1fa974771ea1ed5b8d50480a70c0
Merge "Strip exec_dirs prefix from rootwrap filters"
Merge "Optimize instance queries in compute manager"
Merge "Remove locals() from nova/cells/*"
Merge "Improve unit tests for DB archiving."