Fix tracebacks during downloads of obsoleting transactions. (RhBug:1021087)

Broken by f475a20.
New version: 0.4.5
build: 0.4.5-1
doc: missing newline breaking format.
tests: test some obsoletes.
refactor: Base.build_transaction() so we can unit test its core.
tests: rename MockYumBase to MockBase.

reflects the real code better.
repo.metalink_data is gone (RhBug:1020934)
removed needless flush from output.py
fixed shadowing of variable
expired repos are saved in json instead of shelve
full Python 3 support added