Convert update-ref to use ref_lock API.