SERVER-14800 Replace some masserts with invariant calls in locking