Third round of eliminating allocations in the MongoDB driver. See #633.