Allow retries when resource acquires lock

Previously, if an update or delete on a resource is initiated
concurrently with another action (e.g. a metadata update as the result
of a resource signal) it may end up failing with
exception.UpdateInProgress because its view of the resource's
atomic_key is stale.

Now, we retry, rereading the resource's atomic_key from the db if
needed, up to cfg.CONF.action_retry_limit times.

Change-Id: I4cfa6f691fe916c0d605a712028b88f61ebab4d9
Partial-Bug: #1675286
diff --git a/scenario/test_aodh_alarm.py b/scenario/test_aodh_alarm.py
index 49bcad9..90288a2 100644
--- a/scenario/test_aodh_alarm.py
+++ b/scenario/test_aodh_alarm.py
@@ -55,8 +55,3 @@
         # Note: there is little point waiting more than 60s+time to scale up.
         self.assertTrue(test.call_until_true(
             120, 2, self.check_instance_count, stack_identifier, 2))
-
-        # Temporarily avoids a race condition, addressed in the
-        # next change https://review.openstack.org/#/c/449351/
-        import time
-        time.sleep(3)