cli: Output.history and Output.yumdb.

Two more properties that need the .base reference.
added to_ord function to pycomp.py
fixed GPG key retrieval error
removed installed function from dnf.queries
removed installed_by_name function from dnf.queries
removed installed_by_nevra function from dnf.queries, added filter_by_nevra Query method
added available method to Query class
removed available_by_nevra function from dnf.queries
removed available_by_name function from dnf.queries