MINOR: wdt: also consider that waiting in the thread dumper is normal

It happens that upon looping threads the watchdog fires, starts a dump,
and other threads expire their budget while waiting for the other threads
to get dumped and trigger a watchdog event again, adding some confusion
to the traces. With this patch the situation becomes clearer as we export
the list of threads being dumped so that the watchdog can check it before
deciding to trigger. This way such threads in queue for being dumped are
not attempted to be reported in turn.

This should be backported to 2.0 as it helps understand stack traces.

(cherry picked from commit a37cb1880c81b1f038e575d88ba7210aea0b7b8f)
Signed-off-by: Willy Tarreau <w@1wt.eu>
diff --git a/include/common/debug.h b/include/common/debug.h
index 333203d..f43258e 100644
--- a/include/common/debug.h
+++ b/include/common/debug.h
@@ -70,6 +70,7 @@
 
 struct task;
 struct buffer;
+extern volatile unsigned long threads_to_dump;
 void ha_task_dump(struct buffer *buf, const struct task *task, const char *pfx);
 void ha_thread_dump(struct buffer *buf, int thr, int calling_tid);
 void ha_thread_dump_all_to_trash();