pkg: make pkgconf_scan_all() API more flexible to allow it to scan until it finds a qualifying pkgconf_pkg_t