SERVER-8536 fix index build restarts for a few commands
Merged tests into jsontests.cpp as defined in SERVER-8546