locking: store lockfiles with the resource they are locking. (RhBug:1124316)

Otherwise it is not possible to e.g. run DNF twice for different build roots.

This required taking the responsibility of chosing where to put the lock file
away from the lock module (else it would need to learn about the conf
object...).

User still can not lock read access to root-writable MD cache or similar. The
commit merely keeps the old semantics: if it is locked by the same user, do
not let other process lock it again.
py3: add queue.Queue to pycomp.

Another 2/3 namechange.