Correctly handle custom cursor factories for replset/server and mongos topologies