SERVER-9474 always run through the entire batch-building loop at least once per batch

Because we now run through the loop once with an empty op queue, we will always
do the stuff in "occasionally check some things" at least once per batch.  This
fixes SERVER-9474, where if you had a steady stream of writes, your node in
RECOVERING would never transition to SECONDARY until you caught up completely.
SERVER-9421 do not kill index builds synchronously, to prevent deadlocks

No changes were necessary to the index builder itself; by the time it updates
its curop to reflect the fact that it's an index build, it already has the DB
write lock.  So the only time we can be killed is when we yield.
Extra debugging info for SERVER-9231
SERVER-9072 KeyRange in range_arithmetic.h
SERVER-9072 fix tests to use KeyRange
SERVER-9546: abort M/R if DBClientCursor returns a $err