remove: rpmUtils.TransactionWrapper.returnLeafNodes() method

Unused by dnf, various yum-utils rely on this but the functionality
would be better implemented on repo/sack level which would make it
far more useful than limiting to rpmdb only.
remove: miscutils.pkgTupleFromHeader()

Unused now that returnLeafNodes() is gone from transaction wrapper
remove: miscutils.rangeCompare() and rangeCheck()

Both are entirely unused within dnf
remove: miscutils.formatRequire()

Was imported by cli/output.py but not actually used anywhere within dnf
remove: unused miscutils.rpmOutToStr()
remove: unused string_to_prco_tuple() and imports used only by it
remove: unused miscutils.stringToVersion() and .flagToString()
remove: unused miscutils.compareVerOnly()
Add base_url arg to librepo.download(). (RhBug:968159)

Requires newer python-hawkey and libsolv, please bump requires.
locking: implement and test ProcessLock class.

The main piece to replace the current locking mechanisms from Yum.
locking: remove the old global locking code.

manage things smartly in main.py
locking: as an example introduce rpmdb_lock and metadata_cache_lock.

This is the plan of how things are going to be locked granularly: those system
objects that need exclusive access for some period are locked for that time, but
DNF as a whole doesn't need a global lock.
remove: unused rpm repackaging support remnants
remove: unused rpmtrans internal _dopkgtup() helper
remove: unnecessary testing for prehistoric rpm versions in callback
Minimally teach dnf about rpm rpm >= 4.10 scriptlet start and stop callbacks

This is the same as yum commit b4195162200bc0fa918c25b75073e569dc9ddfa6
to make sure all scriptlet output gets logged (Related: RhBug:615763),
except dont bother testing for rpm version in the callback.
put user locks in /run/user/$UID/dnf.

suggested by msekletar.
fix: traceback for a regular user when /var/lib/dnf/uuid is not world-readable.

removes yumvar['uuid'], noone uses it.
Merge branch 'master' of git://github.com/akozumpl/dnf