Improve test/utils.py

Introduce new class into utils.py to keep glance api tests DRYer

Partially implements blueprint glance-tests-code-duplication

Change-Id: Ic77961fcc83806fd451afa1a0d230f09926ebfd9
(cherry picked from commit 91a226cb1632636a59b7f742c3158f57ce14b550)
Merge "Improve test/utils.py" into stable/havana