Set "history" reason to packages installed during undos.
remove: bunch of old, unused Base() methods.
reduce usage of dnf.yum.constants.
remove: dnf.yum.packages.FakeRepository
remove: dnf.yum.packages.FakeSack
remove: dnf.yum.packages.PackageObject
Work around a bug in NamedTemporaryFile(). (RhBug:1036116)