MINOR: threads: add a timer_t per thread in thread_info

This will be used by the watchdog to detect that a thread locked up.
It's only defined on platforms supporting it. This patch only reserves
the room for the timer in the struct. A special value was reserved for
the uninitialized timer. The problem is that the POSIX API was horribly
designed, defining no invalid value, thus for each timer it is required
to keep a second variable to indicate whether it's valid. A quick check
shows that defining a 32-bit invalid value is not something uncommon
across other implementations, with ~0 being common. Let's try with this
and if it causes issues we can revisit this decision.
diff --git a/include/common/hathreads.h b/include/common/hathreads.h
index 3209909..268dd63 100644
--- a/include/common/hathreads.h
+++ b/include/common/hathreads.h
@@ -58,6 +58,7 @@
 
 extern struct thread_info {
 	clockid_t clock_id;
+	timer_t wd_timer;          /* valid timer or TIMER_INVALID if not set */
 	uint64_t prev_cpu_time;    /* previous per thread CPU time */
 	uint64_t prev_mono_time;   /* previous system wide monotonic time  */
 	unsigned int idle_pct;     /* idle to total ratio over last sample (percent) */
@@ -407,6 +408,7 @@
 extern struct thread_info {
 	pthread_t pthread;
 	clockid_t clock_id;
+	timer_t wd_timer;          /* valid timer or TIMER_INVALID if not set */
 	uint64_t prev_cpu_time;    /* previous per thread CPU time */
 	uint64_t prev_mono_time;   /* previous system wide monotonic time  */
 	unsigned int idle_pct;     /* idle to total ratio over last sample (percent) */