Switch tests to unittest (w/generated test cases)

Specifically:
  * add test generator
  * remove all direct printings to stdout (reporting should be done by
    the unittest)
  * close all open files (unfortunately, we cannot use with statement
    with python 2.4 compatibility)
  * iteritems -> items ... to be 3.* compatible (and we really don't
    need generators here)

Signed-off-by: Matěj Cepl <mcepl@redhat.com>
Works with python2

* Also / is not // anymore.
* Make dict at least a bit readable.

Signed-off-by: Matěj Cepl <mcepl@redhat.com>
Remove python 3.2 incompatibility.

* Don't expect u'' strings to work.
* Fix nbsp_unicode test.
* Also remove workaround for python < 2.3 ... we really don’t need it
  anymore.
* Fix <pre> in list tests.
  Replace onlywhite function with RE.

  I believe that Aaron by mistake put to the html2text.py his
  contribution to the Obfuscated Python Code Contest.

  For the reasons I have no chance to decipher, I have to use RE.
  More obvious replacement with para.isspace() doesn't work.

Signed-off-by: Matěj Cepl <mcepl@redhat.com>