SERVER-14668 don't release locks when in a nested context, add support for yielding