BUG/MEDIUM: server: initialize the orphaned conns lists and tasks at the end

This also depends on the nbthread count, so it must only be performed after
parsing the whole config file. As a side effect, this removes some code
duplication between servers and server-templates.

This must be backported to 1.9.
diff --git a/include/proto/server.h b/include/proto/server.h
index 7aa09e4..fa36e8d 100644
--- a/include/proto/server.h
+++ b/include/proto/server.h
@@ -58,6 +58,7 @@
 int snr_resolution_cb(struct dns_requester *requester, struct dns_nameserver *nameserver);
 int snr_resolution_error_cb(struct dns_requester *requester, int error_code);
 struct server *snr_check_ip_callback(struct server *srv, void *ip, unsigned char *ip_family);
+struct task *srv_cleanup_idle_connections(struct task *task, void *ctx, unsigned short state);
 
 /* increase the number of cumulated connections on the designated server */
 static void inline srv_inc_sess_ctr(struct server *s)