log: buffer logs, write to stderr from a thread
log: buffer logs, write to stderr from a thread

Previously the write to stderr would block the main (Lwt/Uwt) thread,
blocking the stack.

Instead, write to a memory buffer and drain the buffer from a real
thread to guarantee we don't block the Lwt/Uwt universe.

Signed-off-by: David Scott <bfcdf3e6ca6cef45543bfbb57509c92aec9a39fb@recoil.org>

djs55/vpnkit,djs55/vpnkit,djs55/vpnkit