AUTO-442: locking retry in modify_state

Trying to lock again after some time if lock was not acquired while modifying state
trying more granular waiting
lock waiting time is random

If and when multiple server execution try to update the state at same time, the lock is not acquired
since all wait for same amount of time. So, randomizing the wait time
lint fix
added test
separate test for basiclock args and different retry
Merge branch 'master' into auto-442-modify-state-locking
allowing tests blocked on AUTO-442
scheduler test changes

- at time sent while creating policy is 1 second after current time
- removed lock comment
pyflakes fix
Merge pull request #270 from rackerlabs/auto-442-modify-state-locking

AUTO-442: modify_state locking