trace: work around GCC -Wmaybe-uninitialized bug in BEESTRACE
When the BEESTRACE message is a plain string literal, the lambda captures
nothing, so the std::function built from it has an empty target.
libstdc++ deliberately leaves the _Any_data union unwritten in that case,
but GCC's optimizer does not know that, and reports the copy made by
BeesTracer's constructor as a read of an uninitialized value:
/usr/include/c++/14/bits/std_function.h:391:17: warning:
'<anonymous>' may be used uninitialized [-Wmaybe-uninitialized]
391 | __x._M_manager(_M_functor, __x._M_functor, __clone_functor);
The warning also needs the enclosing scope to be reached through another
std::function, so that the whole call chain collapses into one frame.
Exactly one site in the tree qualifies: the BEESTRACE with a literal
message inside the catch_all() lambda in BeesRoots::crawl_thread().
Inlining across the bees-trace.cc and bees-roots.cc boundary additionally
requires link-time optimization, so only distributions that add -flto are
affected -- but since -Werror is always on, those builds fail outright
and produce no binary at all.
Give the lambda an init-capture of __FUNCTION__ and print it. The
closure is no longer empty, the union is visibly initialized, and the
warning goes away. Trace lines gain the name of the function they came
from, matching the format already used on the development branch.
Verified with GCC 14.2.0, with and without -flto=auto, both with -Werror.