rpm_utils: only support packages in is_installed()
Since Fedora 26, dnf no longer contains `noroot` plugin. That means we
can no longer use `dnf install --assumeno` under a non-root user to
check whether `$foo` is installed. Without this patch, all tasks fail on
F26 claiming any dependency is not installed (even when it is).
This patch replaces the former approach with `dnf list --installed`.
That works reliably, but only supports package names and file paths (not
groups, or package version comparisons, etc). Since there's no simple
and better solution, this approach seems satisfactory for the moment.
This whole code might get obsoleted very soon anyway with ansible-based
tasks.
Differential Revision: https://phab.qa.fedoraproject.org/D1216