Make more tests use btest().

Also fix test_glgears_deriv so that it actually animates its gears.
Actually exit test runner when browser tests are done.

Using __del__ didn't work for me with Python 2.7.2 on OS X.
Favor explicit parameter passing over string manipulation.
Merge pull request #1308 from int3/better-tests

Some refactoring / general improvements to the test runner.