Trac #1038: not a fix, just an attempt at improving the situation.
That ticket is caused by _some_ process crashing whiule holding rpmdb locks
(and doing that a lot) It is unclear whether yumhelper is that process, and
why it would be crashing.
This version tries much harder to exit cleanly no matter what.