all: make benchmarks standalone binaries

This has better modularity, since it will let us add other benchamrks
that have different drivers. It also isolates the benchmarks better,
since it avoids contaminating the heap with data allocated at init
time by other benchmarks (e.g., the json benchmark does this).

For golang/go#14304.

Change-Id: I5636152c5ebbd4e416e4979f99c7eb192513a717
Reviewed-by: Dmitry Vyukov <>
Reviewed-by: Russ Cox <>
12 files changed