lib: add rudementary statistics gathering to data-stack debugging These currently just enhance the overly-large alloc_size warning message in t_malloc_real() to show what the history of allocations is. New warnings look like this:  Warning: Growing data stack by 32768 as 'test_run_funcs' reaches 16416 bytes from 202 allocations.
lib: add rudementary statistics gathering to data-stack debugging
These currently just enhance the overly-large alloc_size warning
message in t_malloc_real() to show what the history of allocations
is. New warnings look like this:
 Warning: Growing data stack by 32768 as 'test_run_funcs' reaches 16416 bytes from 202 allocations.

Future possible directions:
t_malloc_real() could be further modified to identify badly-behaved
regions of code that allocate lots of smaller blocks as it happens
(which might be noisy). t_pop() could be modified to detect such code
after it exits its block (so just one warning per instance of
misbehaviour).

Signed-off-by: Phil Carmody <e888d2bd6f13f82caa51a37c03d034c76f661ba3@dovecot.fi>

jwm/dovecot-notmuch,jwm/dovecot-notmuch,jwm/dovecot-notmuch,jwm/dovecot-notmuch,jwm/dovecot-notmuch