Fix handling of errors raised when undoing transactions.

Fixed message logged when undoing an unavailable package and
AssertionError raised when undoing a not installed package.
Fix AssertionError raised when undoing a package available in multiple repos (RhBug:1038403)