crypto: use pubring_dir() context manager systematically.

Hard-changing GNUPGHOME can do no good.
tests: some tests for dnf.crypto.
remove: misc.valid_detached_sig().

not needed, librepo checks stuff for us.
unicode: fixed locale.format error (RhBug:1130432)
cosmetic: order of functions in dnf.crypto.
crypto: add crypto.retrieve() and drop Base._retrievePublicKey()

Add a test.
cleanup: header of dnf.yum.pgpmsg.
simplify misc.import_key_to_pubring()'s signature.

'cachedir' is never used.
util: get rid of an inconvenient 'default_handle' constant.
Fix dnf.crypto.keyinfo2keyid().

It produces wrong results on 64 bit platforms.
cosmetic: sort methods of Repo according to the coding standard.
replace the whole of pgpmsg.py with gpgme and a dummy context.
remove: pgpmsg.py.

Nicely saves us twelve hundred of old untested code with many lint
warnings.

misc.gpgkey_fingerprint_ascii() and misc.getgpgkeyinfo() get removed too, they
are obsolete now.
fix: another 32-bit hex() problem in crypto.
refactor: crypto.keyids_from_pubring() using _extract_signing_subkey().
pycomp: drop to_ord().

Not used.
fix: traceback that GroupPersistor._original might not exist. (RhBug:1130878)
Add repository-packages remove-or-distro-sync command. (RhBug:908764)
Fix setting of the resolving demand for repo-pkgs command.
lint: fix convention violations in the new source files