structured output: reuse buffer
structured output: reuse buffer

There is a mechanism for allocating smallish buffers (< 256 bytes) only once
and then reusing them. Doing that for the structured key/value pairs is an
improvement (measured with https://github.com/kubernetes/kubernetes/pull/106594):

$ $GOPATH/bin/benchstat /tmp/original /tmp/reuse-buffer
name                               old time/op    new time/op    delta
Logging/container/structured-36      41.6µs ± 1%    41.6µs ± 1%     ~     (p=1.000 n=5+5)
Logging/error-value/structured-36    4.01µs ± 3%    3.37µs ± 3%  -16.01%  (p=0.008 n=5+5)
Logging/error/structured-36          3.91µs ± 1%    3.33µs ± 3%  -14.90%  (p=0.008 n=5+5)
Logging/simple/structured-36         3.54µs ± 3%    2.98µs ± 3%  -15.77%  (p=0.008 n=5+5)
Logging/values/structured-36         6.83µs ± 2%    5.31µs ± 5%  -22.34%  (p=0.008 n=5+5)

name                               old alloc/op   new alloc/op   delta
Logging/container/structured-36      10.4kB ± 0%    10.5kB ± 0%   +0.61%  (p=0.008 n=5+5)
Logging/error-value/structured-36      432B ± 0%      320B ± 0%  -25.93%  (p=0.008 n=5+5)
Logging/error/structured-36            448B ± 0%      336B ± 0%  -25.00%  (p=0.008 n=5+5)
Logging/simple/structured-36           408B ± 0%      296B ± 0%  -27.45%  (p=0.008 n=5+5)
Logging/values/structured-36           777B ± 0%      505B ± 0%  -35.01%  (p=0.008 n=5+5)

name                               old allocs/op  new allocs/op  delta
Logging/container/structured-36        64.0 ± 0%      64.0 ± 0%     ~     (all equal)
Logging/error-value/structured-36      9.00 ± 0%      7.00 ± 0%  -22.22%  (p=0.008 n=5+5)
Logging/error/structured-36            10.0 ± 0%       8.0 ± 0%  -20.00%  (p=0.008 n=5+5)
Logging/simple/structured-36           8.00 ± 0%      6.00 ± 0%  -25.00%  (p=0.008 n=5+5)
Logging/values/structured-36           16.0 ± 0%      13.0 ± 0%  -18.75%  (p=0.008 n=5+5)

kubernetes/klog,kubernetes/klog