Rewrite test client.

This makes the timing tool much more modular, and we
can quickly add new test types without an exploding
code base.