Require Python 2.5, major test refactoring

Removed a ton of DRY issues in the test suite. Also modernized the test cases themselves, and fixed several minor bugs.

Running tests is now done with `nosetests`.