MEDIUM: ring: implement a wait mode for watchers

Now it is possible for a reader to subscribe and wait for new events
sent to a ring buffer. When new events are written to a ring buffer,
the applets that are subscribed are woken up to display new events.
For now we only support this with the CLI applet called by "show events"
since the I/O handler is indeed a CLI I/O handler. But it's not
complicated to add other mechanisms to consume events and forward them
to external log servers for example. The wait mode is enabled by adding
"-w" after "show events <sink>". An extra "-n" was added to directly
seek to new events only.
diff --git a/include/types/ring.h b/include/types/ring.h
index 3d69b22..86c507f 100644
--- a/include/types/ring.h
+++ b/include/types/ring.h
@@ -96,6 +96,7 @@
 struct ring {
 	struct buffer buf;   // storage area
 	size_t ofs;          // absolute offset in history of the buffer's head
+	struct list waiters; // list of waiters, for now, CLI "show event"
 	__decl_hathreads(HA_RWLOCK_T lock);
 	int readers_count;
 };