Refactor invocations to Yum commands

Yum commands require an annoying error handling that was polluting a lot of functions.

These commits put all the yum/repoquery logic in a single method which does the correct error handling.

My fixes to the removal workflow will be based on this.