initial sketch of codegen mode for compiletest; doesn't measure / compare / ratchet the disassembly yet
wire up makefile to run codegen tests and add one to start
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.
extra: add explicit ratchet-noise-percent option to benchmark ratchet, plus a few test breaking fixes.
auto merge of #7623 : graydon/rust/codegen-compiletests, r=pcwalton

This is some initial sketch-work for #7461 though it will depend on #7459 to be useful for anything. For the time being, just infrastructure.