BUG/MEDIUM: peers: on shutdown, wake up the appctx, not the stream

This part was missed when peers were ported to the new applet
infrastructure in 1.6, the main stream is woken up instead of the
appctx. This creates a race condition by which it is possible to
wake the stream at the wrong moment and miss an event. This bug
might be at least partially responsible for some of the CLOSE_WAIT
that were reported on peers session upon reload in version 1.6.

This fix must be backported to 1.6.
diff --git a/src/peers.c b/src/peers.c
index d11792f..03a0c9f 100644
--- a/src/peers.c
+++ b/src/peers.c
@@ -1735,11 +1735,9 @@
 	if (ps)
 		ps->reconnect = tick_add(now_ms, MS_TO_TICKS(50 + random() % 2000));
 
-	/* call release to reinit resync states if needed */
-	peer_session_release(appctx);
 	appctx->st0 = PEER_SESS_ST_END;
 	appctx->ctx.peers.ptr = NULL;
-	task_wakeup(stream->task, TASK_WOKEN_MSG);
+	appctx_wakeup(appctx);
 }
 
 /* Pre-configures a peers frontend to accept incoming connections */