MEDIUM: checks: Implement postgres check using tcp-check rules

A shared tcp-check ruleset is now created to support postgres check. This way no
extra memory is used if several backends use a pgsql check.

The following sequence is used :

    tcp-check connect default linger

    tcp-check send-binary PGSQL_REQ log-format

    tcp-check expect !rstring "^E" min-recv 5 \
        error-status "L7RSP" on-error "%[check.payload(6,0)]"

    tcp-check expect rbinary "^520000000800000000 min-recv "9" \
        error-status "L7STS" \
        on-success "PostgreSQL server is ok" \
        on-error "PostgreSQL unknown error"

The log-format hexa string PGSQL_REQ depends on 2 preset variables, the packet
length (check.plen) and the username (check.username).
diff --git a/include/types/checks.h b/include/types/checks.h
index 541666c..9b34cbe 100644
--- a/include/types/checks.h
+++ b/include/types/checks.h
@@ -312,6 +312,7 @@
 #define TCPCHK_RULES_SHARED      0x00000001 /* Set for shared list of tcp-check rules */
 #define TCPCHK_RULES_DEF         0x00000002 /* Ruleset inherited from the default section */
 
+#define TCPCHK_RULES_PGSQL_CHK   0x00000010
 #define TCPCHK_RULES_REDIS_CHK   0x00000020
 #define TCPCHK_RULES_SMTP_CHK    0x00000030
 #define TCPCHK_RULES_SSL3_CHK    0x00000070