[MINOR] move the listener reference from fd to session

The listener referenced in the fd was only used to check the
listener state upon session termination. There was no guarantee
that the FD had not been reassigned by the moment it was processed,
so this was a bit racy. Having it in the session is more robust.
diff --git a/include/types/fd.h b/include/types/fd.h
index 97e14b1..c413245 100644
--- a/include/types/fd.h
+++ b/include/types/fd.h
@@ -3,7 +3,7 @@
   File descriptors states.
 
   Copyright (C) 2000-2008 Willy Tarreau - w@1wt.eu
-  
+
   This library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation, version 2.1
@@ -70,7 +70,6 @@
 	unsigned char ev;                    /* event seen in return of poll() : FD_POLL_* */
 	struct sockaddr *peeraddr;           /* pointer to peer's network address, or NULL if unset */
 	socklen_t peerlen;                   /* peer's address length, or 0 if unset */
-	struct listener *listener;           /* the listener which created this fd, or NULL if unset */
 };
 
 /*
diff --git a/include/types/session.h b/include/types/session.h
index 574f933..eaa053f 100644
--- a/include/types/session.h
+++ b/include/types/session.h
@@ -155,6 +155,7 @@
 	struct list list;			/* position in global sessions list */
 	struct task *task;			/* the task associated with this session */
 	/* application specific below */
+	struct listener *listener;		/* the listener by which the request arrived */
 	struct proxy *fe;			/* the proxy this session depends on for the client side */
 	struct proxy *be;			/* the proxy this session depends on for the server side */
 	int conn_retries;			/* number of connect retries left */