Add expire reservations in backport position.

Change-Id: If0e58da50ebe9b50b414737a9bd81d93752506e2
Related-bug: #1348720
(cherry picked from commit f4454f4c6962dd2c57c08dc7fecfcdebe7924e3b)
Add a retry_on_deadlock to reservations_expire

Now that we have an index for the reservations_expire query, we
have uncovered a race with quota usage updates due to the foreign
key on the table, so just retry if there is a deadlock. This is
a fix to unblock the gate while we try to remove the deadlocks
completely.

Change-Id: I1993c3bd1f81facf1d98a4e29f9e8df4858a7d66
Partial-bug: #1350466
(cherry picked from commit 3619c1914e9925e18c062bc11bc3e708137f8322)
Merge "Add expire reservations in backport position." into stable/icehouse
Merge "Add a retry_on_deadlock to reservations_expire" into stable/icehouse