MINOR: initcall: use initcalls for most post_{check,deinit} and per_thread*

Most calls to hap_register_post_check(), hap_register_post_deinit(),
hap_register_per_thread_init(), hap_register_per_thread_deinit() can
be done using initcalls and will not require a constructor anymore.
Let's create a set of simplified macros for this, called respectively
REGISTER_POST_CHECK, REGISTER_POST_DEINIT, REGISTER_PER_THREAD_INIT,
and REGISTER_PER_THREAD_DEINIT.

Some files were not modified because they wouldn't benefit from this
or because they conditionally register (e.g. the pollers).
diff --git a/src/mux_h2.c b/src/mux_h2.c
index c3cd1e1..e4005a2 100644
--- a/src/mux_h2.c
+++ b/src/mux_h2.c
@@ -3854,7 +3854,8 @@
 __attribute__((constructor))
 static void __h2_init(void)
 {
-	hap_register_post_deinit(__h2_deinit);
 	pool_head_h2c = create_pool("h2c", sizeof(struct h2c), MEM_F_SHARED);
 	pool_head_h2s = create_pool("h2s", sizeof(struct h2s), MEM_F_SHARED);
 }
+
+REGISTER_POST_DEINIT(__h2_deinit);