MINOR: cli/debug: add a thread dump function

The new function ha_thread_dump() will dump debugging info about all known
threads. The current thread will contain a bit more info. The long-term goal
is to make it possible to use it in signal handlers to improve the accuracy
of some dumps.

The function dumps its output into the trash so as it was trivial to add,
a new "show threads" command appeared on the CLI.
diff --git a/include/common/debug.h b/include/common/debug.h
index 014e5ee..ae6cdc8 100644
--- a/include/common/debug.h
+++ b/include/common/debug.h
@@ -81,6 +81,11 @@
 		##args);                                           \
         } while (0)
 
+
+struct task;
+void ha_task_dump(const struct task *task, const char *pfx);
+void ha_thread_dump(int thr);
+
 /* This one is useful to automatically apply poisonning on an area returned
  * by malloc(). Only "p_" is required to make it work, and to define a poison
  * byte using -dM.