sqlalchemy: use retry_on_deadlock in update_resource()
sqlalchemy: use retry_on_deadlock in update_resource()

MySQL is pretty bad at handling UPDATE conflicts and raises deadlock
errors from time to time, even in our functional tests. Let's use the
oslo_db.api.retry_on_deadlock decorator to retry if it happens.

Change-Id: Idf366a3a3232046046075e0927d7c805b50ae1e0
Closes-Bug: #1471169

gnocchixyz/gnocchi,sileht/gnocchi,sileht/gnocchi,gnocchixyz/gnocchi,leandroreox/gnocchi,leandroreox/gnocchi