Adding status field to image location -- scrubber queue switching

Adding a status field to image's each location property, each location
status can be 'active', 'pending_delete' and 'deleted'.

Under location's status information Scrubber service can make cleanup
based on DB records also but not a dedicated queue-file for each image.

This is fourth part of this change which covered using scrubber DB queue
in store. This change allow cloud admin/operator deploy a central
Scrubber service(s) on one or two hosts only, before this Glance require
deploy it on each API service host since Scrubber only support load
pending delete jobs from local file.

Partially-Implements BP: image-location-status

Change-Id: I6910b55de8c3b203560d75ff3d1675eda31ae786
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
Use @mock.patch.object instead of mock.MagicMock

Some unittests replace methods by mock objects, so they are leave mocked
when unittest finished. It can cause a lot of issues, because when we
try to get access to these attributes in the next test, we get mock
object instead of real attribute. Use @mock.patch.object decorator to
get attributes `unmocked` after test.

Change-Id: I23b3926a7671e0669315836da787ec88a812d67b
Fix bad indentation in glance

Fix for bad indentation warnings from pylint.

Closes-Bug: #1356406

Change-Id: I425de4975a4468495a000e408e8d7cf94b646912
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Merge "Adding status field to image location -- scrubber queue switching"
Merge "Use @mock.patch.object instead of mock.MagicMock"
Merge "Fix bad indentation in glance"