add 'assignlock' command

This command allows a caller to lock a free resource and assign it
to an arbitrary user.