utils: New locking decorator

This is heavily inspired by our current locking context manager, with
one difference: this checks if the current process is the lock owner,
and if yes then it doesn't complain.

Using it as a decorator allows offloading it to the utils module,
instead of having it in the main class.

Also, it makes the main class much more readable.

Finally, it is much easier to lock a method which wasn't locked than
with the previous way.
install: Use the new locking decorator

Isn't that much nicer? :)
check-update: Use  the new locking decorator
remove: Use the new locking decorator
update: Use the new locking decorator

I'm really liking this.
rebuild: Protect by a lock

We've had problems where someone was running this on a machine while
someone else was updating.

Turns out, Yum doesn't like having its cache destroyed in the middle of
an update transaction.

The transaction aborts, leaving the machine in a broken state.

This should fix it.
list: Don't lock

There really isn't any reason to lock when listing packages.
prepare: Use the locking decorator

We really need to lock this, because if the cache is old, then it will
need to be downloaded, which is really not a good thing to do in the
middle of an update transaction.
Remove our old locking context manager

Everything has been ported to the new decorator.
last-updated: Just make sure we won't refresh the cache
New release: 5.0.12