Implement lock-free mechanism for db-lock
Implement lock-free mechanism for db-lock

Select-for-update lock is not compatible with galera in production.
In order to use it, we have to retry with certification which consumes
much computing resource and time to wait in galera cluster.

Nova has implemented a lock-free mechanism to get rid of select-for-update,
while maintaining atomic update. [1]

We implement this kind of lock-free mechanism for our db-lock.
As a result, the db-lock is much more efficient for galera.

[1] https://blueprints.launchpad.net/nova/+spec/lock-free-quota-management

Change-Id: I15dadce2b15b17df526cfa1d0196acf1dd87575d

openstack/dragonflow,openstack/dragonflow,openstack/dragonflow