Fix for throwing duplicate key exception

in sharded clusters sometimes the CommandResult for a duplicate key
error looks like this:

{
    "serverUsed": "localhost:22023",
    "err": "error inserting 1 documents to shard shard0000:hoffrocket.local:22020 at version 2|1||53bc4ba51d95f80dd550b55b :: caused by :: E11000 duplicate key error index: test.t.$_id_  dup key: { : 1 }",
    "code": 16460,
    "n": 0,
    "ok": 1.0
}

this patch handles the case where the error code doesn't agree with the message