Python3: do not use contextlib.nested()

Use the "mock.patch.object" decorators instead: they are compatible with Python
2.6, 2.7 and 3.3.

Change-Id: Iba053caef0d8095f8df74fbf9a59059093bc06e8
Blueprint: make-python3-compatible
Merge "Python3: do not use contextlib.nested()"