Fix double lock and double free and add missing free for state lock.

Signed-off-by: Jeremy Bongio <jbongio@us.ibm.com>
Add support for removing delegation state during unlock.

Signed-off-by: Jeremy Bongio <jbongio@us.ibm.com>
Fix search for delegations in delegreturn. Fix second arg to state_del.

Signed-off-by: Jeremy Bongio <jbongio@us.ibm.com>
Fix owner added to delegation lock entries.

Signed-off-by: Jeremy Bongio <jbongio@us.ibm.com>