fix race condition between addCleanup and lockutils

it turns out that addCleanup is actually running much later than
anticipated, so by that time we're actually outside of the
synchronized region that lockutils has created. This means that we
have a potential race in tearing down our resources. This potential
race has become a 100% race if you turn on additional workers in
devstack, which jog0 exposed today.

Convert the lockutils usage to a fixture based approach which will
keep the lock around through the cleanup phase.

Fixes bug #1221469

Co-author: Joe Gordon <joe.gordon0@gmail.com>

Change-Id: I2cb73cb64cc04077cf1595a880b124f31aa13f89
1 file changed