SERVER-13163/SERVER-13165 Refactor implementation of insert write command in mongod.

The goal of the refactoring is to clarify the control flow of the batch
execution of inserts, and in so doing to cleanly handle PageFaultExceptions,
properly handle demotion to secondary, correctly profile individual document
insertions within the batch, and correctly attribute lock hold and acquisition
time to those individual insertions.

It is also intended that this refactoring will resolve memory leaks in the
insert code path, by more carefully tracking ownership of WriteErrorDetail
objects throughout the WriteBatchExecutor class.