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)
  * fix Travis-CI metadata to work on whole supported range of python
    versions.
  * make installation of dependencies in travis-CI and other testing
    related stuff working independently from python version and both
    with unittest (for python >= 2.7) and unittest2 (for python < 2.7)

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