tests/xbps/xbps-rindex: fix tests after 4403caa (only use test repo).
xbps_find_pkg_orphans: minor optimizations.
xbps_pkgdb_get_pkg_metadata: avoid an extra function call.
xbps_array_foreach_cb_multi: remove useless mutex.
lib/rpool_get.c: move asserts to the parent function.