Use isMaster response instead of MongoClient::getConnections()

MongoClient::getConnections() and getHosts() is not reliable if multiple clients have been constructed, as hosts are not associated with clients. Using isMaster is more reliable, since that is routed to the same connection as our batch execution.

This allows us to remove MongoClient as a dependency altogether.
Include write concern with each legacy operation

Using {w:1} and deferring the full write concern until the end can work with standalone servers and replica sets, but would be unreliable for mongos (GLE may not hit all shards previously written to). Using the full write concern will be consistent with other driver implementations, even thought it comes as a cost to performance.

Since we're allowing the write concern on each legacy operation, allow for the case of {w:0}, where we may not have a result to process.
Compose MongoWriteBatch classes for exception handling

MongoWriteBatch::execute() will throw MongoWriteConcernException on write errors, but we actually need to merge the command response into a bulk result.

If the write command fails entirely, we'll allow that exception to propagate.