* Before this change method acquire_lock() would override all changes
made for an entity by a concurrent transaction when calling
entity.update() although one line before it should have read this
entity from DB and update only a timestamp to acquire the lock.
The solution is just to append "FOR UPDATE" to an SQL statement
when fetching an entity from DB. In this case we don't need to
artificially update a timestamp at all.
* Unit test for MySQL or Postgres is currently impossible, all unit
tests are run against sqlite
* Adding "PYTHONHASHSEED = 0" into "venv" environment in tox.ini to
prevent sphinx from failing. It should be added to "venv" because
docs building run with command "tox -evenv -- python setup.py build_sphinx".
* Fixed minor style issues
Change-Id: Ia749f397e18e927820ff7ae6bac7d28dc2aa2ba4
(cherry picked from commit 3e9aa8b310)