Add mrn::Lock

It is a convenient class for ensuring unlock.