lockutils: do not grab the lock in creators

The functions used to create the lock should not grab it, as it is not
their roles to do so. Instead, the lock is acquired in the decorator
using these functions.

Change-Id: Ia6d550869ae1c60883658af1c385d49728b6cd60
lockutils: expand add_prefix

There is no need to build a function closure each time we run through
this code. It is more effective to expand the code right away, so let's
do that.

Change-Id: I13174727e88bf5aa86659b6271d13ebcddc7708c
Merge "lockutils: do not grab the lock in creators"
Merge "lockutils: expand add_prefix"