[MAJOR] session: remove the ->srv pointer from struct session

This one has been removed and is now totally superseded by ->target.
To get the server, one must use target_srv(&s->target) instead of
s->srv now.

The function ensures that non-server targets still return NULL.
diff --git a/include/proto/stream_interface.h b/include/proto/stream_interface.h
index 5c198dc..ec8d5d0 100644
--- a/include/proto/stream_interface.h
+++ b/include/proto/stream_interface.h
@@ -88,6 +88,13 @@
 	return a->type == b->type && a->ptr.v == b->ptr.v;
 }
 
+static inline struct server *target_srv(struct target *t)
+{
+	if (!t || t->type != TARG_TYPE_SERVER)
+		return NULL;
+	return t->ptr.s;
+}
+
 #endif /* _PROTO_STREAM_INTERFACE_H */
 
 /*
diff --git a/include/types/session.h b/include/types/session.h
index de87607..2ac2232 100644
--- a/include/types/session.h
+++ b/include/types/session.h
@@ -168,7 +168,6 @@
 	struct buffer *req;			/* request buffer */
 	struct buffer *rep;			/* response buffer */
 	struct stream_interface si[2];          /* client and server stream interfaces */
-	struct server *srv;			/* the server the session will be running or has been running on */
 	struct server *srv_conn;		/* session already has a slot on a server and is not in queue */
 	struct target target;			/* target to use for this session */
 	struct pendconn *pend_pos;		/* if not NULL, points to the position in the pending queue */