packed_refs_unlock(), packed_refs_is_locked(): new functions