rpm_load(): fix return type

This caused misconstruction of the package set, which was fixed
by a subsequent package set update which did not trigger any package
downloads.
Add template tagged
Introduce type safety for database IDs
database::update_package_set_caches(): assert transaction status