MongoDB: fix failing tests, improve WriteConcern handling