trace: Redesign BeesTracer to accumulate and conditionally log traces
Redesign the BeesTracer class and BEESTRACE macro to collect trace messages in
a thread-local accumulator (tl_captured_traces) during exception stack
unwinding rather than logging them immediately.
If stack unwinding successfully reaches the top of the stack (outermost
tracer), the accumulated traces are written in natural function call order
(caller-first) bracketed by standard BEGIN and END markers. If the exception
is caught early, the traces are safely discarded without polluting logs.
Additionally, update the BEESTRACE macro to use C++14 lambda init-capture of
__FUNCTION__ and brace initialization to cleanly avoid both the Most Vexing
Parse and C++20 designator ambiguities, ensuring the true function name is
printed instead of 'operator()'.