CXX-243 Refactor batching loop in writers

The existing loop, while correct, introduced a lot of state variables and iterator
manipulation. Some compilers were unable to prove initialization of all state
variables on all paths.

Refactoring to use a double loop and two tracking iterators removes the need
for the extra state and iterator manipulation and elminiates the warnings.
CXX-233 Namespace qualify names in BSONForEach macro
CXX-241 Add optimized builds to travis
CXX-244 Remove unused BSON atomics implementation
CXX-204 Record atomics implementation selection in config.h at build time