MINOR: tools: add append_prefixed_str()

This is somewhat related to indent_msg() except that this one places a
known prefix at the beginning of each line, allows to replace the EOL
character, and not to insert a prefix on the first line if not desired.
It works with a normal output buffer/chunk so it doesn't need to allocate
anything nor to modify the input string. It is suitable for use in multi-
line backtraces.

(cherry picked from commit a2c9911ace8537e0a350daf8d981170a001b6c7a)
[wt: backported to improve troubleshooting when the watchdog fires]
Signed-off-by: Willy Tarreau <w@1wt.eu>
diff --git a/include/common/standard.h b/include/common/standard.h
index 0f4b187..cdefc9f 100644
--- a/include/common/standard.h
+++ b/include/common/standard.h
@@ -1238,6 +1238,7 @@
  *   free(err);
  */
 char *indent_msg(char **out, int level);
+int append_prefixed_str(struct buffer *out, const char *in, const char *pfx, char eol, int first);
 
 /* removes environment variable <name> from the environment as found in
  * environ. This is only provided as an alternative for systems without