cmd/bent: cleanup, add helpers, avoid possible slice-aliasing errors.

Change-Id: I1d3fefe39898bf0913692c667318d111de7429b8
Reviewed-on: https://go-review.googlesource.com/c/benchmarks/+/432362
Reviewed-by: Michael Pratt <mpratt@google.com>
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2 files changed