A simple perf optimization in pack-objects.c

Instead of having `cb_tree_walk` malloc+free a string on each invocation, just use a single buffer for the entire tree walk. This is less work.