MEDIUM: pools: call malloc_trim() from pool_gc()

If available it definitely makes sense to call it since it's also
called when stopping to reclaim the maximum possible memory.

(cherry picked from commit 88366c2926deac5ee257b6c541633b6a8b5111b3)
[wt: backported as it helps not only on reload but also on SIGQUIT to
     try to return all unused memory]
Signed-off-by: Willy Tarreau <w@1wt.eu>
diff --git a/src/pool.c b/src/pool.c
index 5130efb..03cb2ec 100644
--- a/src/pool.c
+++ b/src/pool.c
@@ -359,6 +359,10 @@
 
 	if (!isolated)
 		thread_release();
+
+#if defined(HA_HAVE_MALLOC_TRIM)
+	malloc_trim(0);
+#endif
 }
 
 #else /* CONFIG_HAP_LOCKLESS_POOLS */