Add support for connection to Mongo DB replica sets.
Add support for Mongo write concern.

Note: There seem to be some kind of bug with rJava and the mongo driver when directly connecting to a replica set: all operations hang. To avoid the issue, it first connect as if there wasn't a replica, close the connection and then reconnect to the replica.