fix-#746: Stop ensure_indexes running on a secondaries unless connection is through mongos
Fix merge of PR #747