Upstream: vmihailenco#322
EncodeValue uses bytes.Buffer internally which grows via makeSlice. When called repeatedly, the buffer grows exponentially and does not release memory, visible via pprof.
Note: Our pooled byteSliceWriter with the 32KB cap in PutEncoder() may partially address this for the Marshal() path. The streaming encoder path may still be affected.