Retry quota_reserve on DBDeadlock

quota_reserve() can raise DBDeadlock... so this adds the decorator that
retries the transaction.

Fixes bug 1193199

Change-Id: Id632360372b21f3e75a2af50153eb18cc2025390
Merge "Retry quota_reserve on DBDeadlock"