Allow internal state of Builder to use IO.
Benchmark with Criterion.
Inlining varInt gives 2x speedup and much less allocation.