Documentation and code cleanup in test suite

Add (lots) of documentation for various parts of the test suite in the
form of Python docstrings. Also, clean up some of the redundant code and
fix indentation issues.
Handle multibyte characters in progressbar

This commit fixes a bug in the progressbar implementation wherein
filenames with multibyte characters were not handled correctly.
track origins when testing with valgrind
fixed memleak in retrieve_url()
Switched to parallel test harness
fixed test suite race conditions due to double usage of names
remove run-px from tests/makefile.am
use test filename as default test name