Add tests for the streaming connection backoffs.

Move mock.py contents into test_utils.py to fix conflict between local mock.py and mock library.