MINOR: fd: add fd_write_frag_line() to send a fragmented line to an fd

Currently both logs and event sinks may use a file descriptor to
atomically emit some output contents. The two may use the same FD though
nothing is done to make sure they use the same lock. Also there is quite
some redundancy between the two. Better make a specific function to send
a fragmented message to a file descriptor which will take care of the
locking via the fd's lock. The function is also able to truncate a
message and to enforce addition of a trailing LF when building the
output message.
diff --git a/include/types/fd.h b/include/types/fd.h
index 1684537..5336461 100644
--- a/include/types/fd.h
+++ b/include/types/fd.h
@@ -24,6 +24,7 @@
 
 #include <common/config.h>
 #include <common/hathreads.h>
+#include <common/ist.h>
 #include <types/port_range.h>
 
 /* Direction for each FD event update */