Common lock api in gfapi for things like nfsv4 delegation support

Signed-off-by: Anand Subramanian <anands@redhat.com>