librbd: add lock2 function to support lock duration & flags
librbd: add rbd_lock_shared2 api