MEDIUM: stream-int: return the allocated appctx in stream_int_register_handler()

The task returned by stream_int_register_handler() is never used, however we
always need to access the appctx afterwards. So make it return the appctx
instead. We already plan for it to fail, which is the reason for the addition
of a few tests and the possibility for the HTTP analyser to return a status
code 500.
diff --git a/src/peers.c b/src/peers.c
index c1d85f2..e56bdfc 100644
--- a/src/peers.c
+++ b/src/peers.c
@@ -1097,8 +1097,9 @@
 	struct appctx *appctx;
 
 	s->target = &peer_applet.obj_type;
-	stream_int_register_handler(&s->si[1], objt_applet(s->target));
-	appctx = si_appctx(&s->si[1]);
+	appctx = stream_int_register_handler(&s->si[1], objt_applet(s->target));
+	if (!appctx)
+		return -1;
 	appctx->st0 = PEER_SESSION_ACCEPT;
 	appctx->ctx.peers.ptr = s;
 
@@ -1175,8 +1176,9 @@
 	if (s->fe->options2 & PR_O2_INDEPSTR)
 		s->si[0].flags |= SI_FL_INDEP_STR;
 
-	stream_int_register_handler(&s->si[0], &peer_applet);
-	appctx = si_appctx(&s->si[0]);
+	appctx = stream_int_register_handler(&s->si[0], &peer_applet);
+	if (!appctx)
+		goto out_fail_conn1;
 	appctx->st0 = PEER_SESSION_CONNECT;
 	appctx->ctx.peers.ptr = (void *)ps;