Adds RaceConditionIT for issue 349 and makes the number of io threads configurable
Synchronizes MongoDocument.putAll in an attempt to fix concurrency issues