Don't need to init testr explicitly

In run_tests.sh, function init_testr will initialize testr if the
directory .testrepository is not existed. Actually, testr will do
the check before run the test:

In Python package testrepository, setuptools_command.py:Testr.run

68 def run(self):
69 """Set up testr repo, then run testr"""
70     if not os.path.isdir(".testrepository"):
71         self._run_testr("init")

"python setup.py testr" will trigger this function to create
.testrepository if not exist.

So, init_testr can be removed safely.

Fixes Bug #1220149

Change-Id: I4dfcdfa5e1e323bbc7ee3add5d9d0888a42e3812
Convert tests to HTTPretty and reorganize

There are a lot of problems with the current means of mocking. Most
annoyingly is that we cannot differ the call to the request library by
even a single optional header or whitespace difference without breaking
the mock. HTTPretty does a better job of this because it only cares
about what is transmitted over the socket.

Rewrite tests so that they no longer do string comparisons of JSON encoded
dictionaries. This meant that they had to order the dictionary before
encoding and would fail tests where the ordering was not followed.

In the process of this I reorganized the inheritance of the
utils.TestCase object so that there is a clear separation between the
data stored on the V2 and V3 base test objects.

Change-Id: I590df65adb1d2177b4be4e016708db05131b6880
Merge "Don't need to init testr explicitly"
Merge "Convert tests to HTTPretty and reorganize"