metadata lock/unlock implemented with test cases, split Post operations to Lock and Unlock operations, and checking for WRITE permission only for lock and unlock

Signed-off-by: Babu Shanmugam <anbu@enovance.com>