pmerge: check installed repos if input matches multiple pkgs

This makes pmerge work similar to portage where running `emerge pkgname`
will rebuild the installed pkg that matches the pkgname if multiple
matches exist and only one of them is installed.