Significant cleanup of testensemble.py.

Now it should be really fast to write tests for new trajectory types. This
is really cute, actually.