Sync lockutils from Oslo

90b6a65 Fix locking bug
27d4b41 Move synchronized body to a first-class function
15c17fb Make lock_file_prefix optional
1a2df89 Enable H302 hacking check
b41862d Use param keyword for docstrings

Fixes bug 1065531
And bug 1162047

Change-Id: Ide79292fae6f779ecd4ac166d68c8f10ca728409
Merge "Sync lockutils from Oslo"