BUG/MEDIUM: checks: Don't add a tcpcheck ruleset twice in the shared tree

When a tcpcheck ruleset is created, it is automatically inserted in a global
tree. Unfortunately for applicative health checks (redis, mysql...), the created
ruleset is inserted a second time during the directive parsing. The leads to a
infinite loop when haproxy is stopped when we try to scan the tree to release
all tcpcheck rulesets.

Now, only the function responsible to create the tcpcheck ruleset insert it into
the tree.

No backport needed.
diff --git a/src/checks.c b/src/checks.c
index b5270b0..d42edf4 100644
--- a/src/checks.c
+++ b/src/checks.c
@@ -944,7 +944,9 @@
 	return NULL;
 }
 
-/* Creates a new shared tcp-check ruleset  */
+/* Creates a new shared tcp-check ruleset and insert it in shared_tcpchecks
+ * tree.
+ */
 static struct tcpcheck_ruleset *create_tcpcheck_ruleset(const char *name)
 {
 	struct tcpcheck_ruleset *rs;
@@ -6276,8 +6278,6 @@
 	chk->index = 1;
 	LIST_ADDQ(&rs->rules, &chk->list);
 
-	ebis_insert(&shared_tcpchecks, &rs->node);
-
   ruleset_found:
 	rules->list = &rs->rules;
 	rules->flags |= TCPCHK_RULES_REDIS_CHK;
@@ -6377,8 +6377,6 @@
 	chk->index = 1;
 	LIST_ADDQ(&rs->rules, &chk->list);
 
-	ebis_insert(&shared_tcpchecks, &rs->node);
-
   ruleset_found:
 	rules->list = &rs->rules;
 	rules->flags |= TCPCHK_RULES_SSL3_CHK;
@@ -6515,8 +6513,6 @@
 	chk->index = 4;
 	LIST_ADDQ(&rs->rules, &chk->list);
 
-	ebis_insert(&shared_tcpchecks, &rs->node);
-
   ruleset_found:
 	rules->list = &rs->rules;
 	rules->flags |= TCPCHK_RULES_SMTP_CHK;
@@ -6662,8 +6658,6 @@
 	chk->index = 3;
 	LIST_ADDQ(&rs->rules, &chk->list);
 
-	ebis_insert(&shared_tcpchecks, &rs->node);
-
   ruleset_found:
 	rules->list = &rs->rules;
 	rules->flags |= TCPCHK_RULES_PGSQL_CHK;
@@ -6887,8 +6881,6 @@
 		LIST_ADDQ(&rs->rules, &chk->list);
 	}
 
-	ebis_insert(&shared_tcpchecks, &rs->node);
-
   ruleset_found:
 	rules->list = &rs->rules;
 	rules->flags |= TCPCHK_RULES_MYSQL_CHK;
@@ -6972,8 +6964,6 @@
 	chk->index = 2;
 	LIST_ADDQ(&rs->rules, &chk->list);
 
-	ebis_insert(&shared_tcpchecks, &rs->node);
-
   ruleset_found:
 	rules->list = &rs->rules;
 	rules->flags |= TCPCHK_RULES_LDAP_CHK;
@@ -7049,8 +7039,6 @@
 	chk->index = 1;
 	LIST_ADDQ(&rs->rules, &chk->list);
 
-	ebis_insert(&shared_tcpchecks, &rs->node);
-
   ruleset_found:
 	rules->list = &rs->rules;
 	rules->flags |= TCPCHK_RULES_SPOP_CHK;
@@ -7398,8 +7386,6 @@
 	chk->index = 1;
 	LIST_ADDQ(&rs->rules, &chk->list);
 
-	ebis_insert(&shared_tcpchecks, &rs->node);
-
   ruleset_found:
 	rules->list = &rs->rules;
 	rules->flags |= TCPCHK_RULES_AGENT_CHK;