BUG/MEDIUM: register peer sync handler in the proper order

Hervé Commowick reported a failure to resync upon restart caused by a
segfault on the old process. This is due to the data_ctx of the connection
being initialized after the stream interface.
diff --git a/src/peers.c b/src/peers.c
index 0ab2e52..a4ea915 100644
--- a/src/peers.c
+++ b/src/peers.c
@@ -1162,10 +1162,10 @@
 	s->si[0].flags = SI_FL_NONE;
 	if (s->fe->options2 & PR_O2_INDEPSTR)
 		s->si[0].flags |= SI_FL_INDEP_STR;
-	s->si[0].conn.data_ctx = (void *)ps;
-	s->si[0].applet.st0 = PEER_SESSION_CONNECT;
 
 	stream_int_register_handler(&s->si[0], &peer_applet);
+	s->si[0].applet.st0 = PEER_SESSION_CONNECT;
+	s->si[0].conn.data_ctx = (void *)ps;
 
 	s->si[1].conn.t.sock.fd = -1; /* just to help with debugging */
 	s->si[1].owner = t;