Avoid leaving stale rpmdb locks behind (rhbz#918184)

Remember to free rpm iterator and transaction set in rpm_get_package_nvr()
on successfull return too, otherwise this will leave stale rpmdb
locks behind.

Signed-off-by: Jakub Filak <jfilak@redhat.com>