extra: simplify the bench stat loop, improve stability somewhat (?)
extra: add ToJson for TreeMap.
extra: factor ConsoleTestState methods into an impl, fix perf bug.

It was re-reading terminfo on each line of output.
extra: add metrics ratchet to test driver.