MINOR: stats: adapt to the new buffers API

The changes are fairly straightforward. Some places require to trim
the length. Maybe we'd need a b_extend() or b_adjust() for this.
1 file changed