MEDIUM: log: add support for logging to a ring buffer

Now by prefixing a log server with "ring@<name>" it's possible to send
the logs to a ring buffer. One nice thing is that it allows multiple
sessions to consult the logs in real time in parallel over the CLI, and
without requiring file system access. At the moment, ring0 is created as
a default sink for tracing purposes and is available. No option is
provided to create new rings though this is trivial to add to the global
section.
diff --git a/include/types/log.h b/include/types/log.h
index dbbd73b..a29ecf5 100644
--- a/include/types/log.h
+++ b/include/types/log.h
@@ -28,6 +28,7 @@
 #include <common/config.h>
 #include <common/hathreads.h>
 #include <common/mini-clist.h>
+#include <types/ring.h>
 
 #define NB_LOG_FACILITIES       24
 #define NB_LOG_LEVELS           8
@@ -51,6 +52,7 @@
 enum log_tgt {
 	LOG_TARGET_DGRAM = 0, // datagram address (udp, unix socket)
 	LOG_TARGET_FD,        // file descriptor
+	LOG_TARGET_BUFFER,    // ring buffer
 };
 
 /* lists of fields that can be logged */
@@ -203,6 +205,7 @@
 	struct list list;
 	struct sockaddr_storage addr;
 	struct smp_info lb;
+	struct ring *ring;
 	enum log_tgt type;
 	int format;
 	int facility;