Fix build without any compression enabled
shared: add MIN3 macro

This is like MIN but evaluates 3 arguments. We already have MAX3, so add
the equivalent for MIN.
shared: fix coding-style for ring-buffer implementation

We use "typedef struct Ring Ring" with camel-case for internal objects.
So rename "struct ring" to "Ring".
sd-event: always call epoll_ctl() on mask-updates if edge-triggered

A call to sd_event_source_set_io_events() skipps calling into the kernel
if the new event-mask matches the old one. This is safe for
level-triggered sources as the kernel moves them onto the ready-list
automatically if events change. However, edge-triggered sources might not
be on the ready-list even though events are present.

A call to sd_event_source_set_io_events() with EPOLLET set might thus be
used to just move the io-source onto the ready-list so the next poll
will return it again. This is very useful to avoid starvation in
priority-based event queues.

Imagine a read() loop on an edge-triggered fd. If we cannot read data fast
enough to drain the receive queue, we might decide to skip reading for now
and schedule it for later. On edge-triggered io-sources we have to make
sure it's put on the ready-list so the next dispatch-round will return it
again if it's still the highest priority task. We could make sd-event
handle edge-triggered sources directly and allow marking them ready again.
However, it's much simpler to let the kernel do that for now via
EPOLL_CTL_MOD.
gitignore: ignore .swp files

vim places them in the source-tree while editing files. Ignore them.