SERVER-12380 Port update optimizations to batch write commands.

Doing this requires that the write commands set last error themselves, rather
than depending on the assert-time setting used previously, as well as minor
restructuring of the multiUpdate() function.