Fixing incorrect mocks usage in unit tests

This patch fixes some incorrect mocks usage in the unit tests for Rally.
Those mocks were initialized in a wrong way (via the start() method in the
test case setUp()) which presented an opportunity for a race condition.
Here, this get replaced with "with ... as ..." blocks.

Change-Id: Ifad16ee6454abcb42e05bb187842a6682d7924db
Closes-Bug: #1236725