Remove double assignment (its assigned after the ns validation)
Remove unused (and broken) function

Can result in a null pointer dereference as it
doesn't check the return value from bson_next()
Make static analyzers happy.. cursor_id and int64_id will never both be set

But thats not something a static analyzer understands
Make sure we have a command
Since we know the string length, use it
No need to reset something that wasn't set
Fix a memory leak when one of the servers is blacklisted
Fixed PHP-906: Segfault in mongo_deregister_callback_from_connection