extract _setup_timeouts in test.py

Cleaning up the base test.py to be a little more understandable about
what is going on, the chunks of work being accomplished, and why. This
will hopefully make it possible to pull some of this work out of tests
that don't need it.

Change-Id: I2baa75280c32e5a2affcdd54d231df7f034d390f
Merge "extract _setup_timeouts in test.py"