bankd: Implement thread-safe SIGUSR1 talloc context reporting

If the main thread receives SIGUSR1, we dump its talloc report and
then signal all worker threads so each can dump their own talloc
report.

Change-Id: I89e7e22de5557376bd5a9625662d99ac0badf00c
diff --git a/src/bankd.h b/src/bankd.h
index 5411968..0ca1984 100644
--- a/src/bankd.h
+++ b/src/bankd.h
@@ -61,6 +61,8 @@
 
 	/* thread of this worker. */
 	pthread_t thread;
+	/* top talloc context for this worker/thread */
+	void *tall_ctx;
 
 	/* File descriptor of the TCP connection to the remsim-client (modem) */
 	struct {
@@ -101,6 +103,9 @@
 	/* list of slot mappings. only ever modified in main thread! */
 	struct slotmaps *slotmaps;
 
+	/* pthread ID of main thread */
+	pthread_t main;
+
 	/* list of bankd_workers. accessed/modified by multiple threads; protected by mutex */
 	struct llist_head workers;
 	pthread_mutex_t workers_mutex;