[MEDIUM] add ability to connect to a server from an IP found in a header

Using get_ip_from_hdr2() we can look for occurrence #X or #-X and
extract the IP it contains. This is typically designed for use with
the X-Forwarded-For header.

Using "usesrc hdr_ip(name,occ)", it becomes possible to use the IP address
found in <name>, and possibly specify occurrence number <occ>, as the
source to connect to a server. This is possible both in a server and in
a backend's source statement. This is typically used to use the source
IP previously set by a upstream proxy.
diff --git a/include/proto/proto_http.h b/include/proto/proto_http.h
index 8213e3b..e7181ec 100644
--- a/include/proto/proto_http.h
+++ b/include/proto/proto_http.h
@@ -92,6 +92,8 @@
 void http_capture_bad_message(struct error_snapshot *es, struct session *s,
                               struct buffer *buf, struct http_msg *msg,
 			      struct proxy *other_end);
+unsigned int get_ip_from_hdr2(struct http_msg *msg, const char *hname, int hlen,
+			      struct hdr_idx *idx, int occ);
 
 void http_init_txn(struct session *s);
 void http_end_txn(struct session *s);