Fix collection order issues and unit test failures

A randomized PYTHONHASHSEED caused the glance API to return certain data
in a nondeterministic order, breaking some tests. This patch sorts the
returned data before testing against a pre-sorted expected values.

This patch also fixes some unit test failures with the new version of
testtools (0.9.36) and directly calling setUp(). This was added to this
patch to avoid blocking more Glance tests.

Co-authored-by: Fei Long Wang <flwang@catalyst.net.nz>
Co-authored-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>

Icehouse-Conflicts:
	glance/tests/unit/common/test_wsgi.py

Havana-Conflicts:
	glance/tests/integration/legacy_functional/test_v1_api.py
	glance/tests/unit/common/test_wsgi.py
	glance/tests/unit/test_glance_replicator.py
	glance/tests/unit/test_vmware_store.py
	glance/tests/unit/v2/test_images_resource.py
	glance/tests/unit/v2/test_tasks_resource.py

Partial-bug: #1348818
Change-Id: Ie92c6bb5663826713ca99e8f2f7d70f3faef6675