Fix typo in test metric ratchet stdout output
rustc: support dumping the AST as JSON

This is mostly useful for working on rustc, when one is unfamiliar with the
AST a particular construct will produce. It's a -Z flag as it's very much for
debugging.

Closes #10485
auto merge of #12389 : zr40/rust/fix-test-metric-typo, r=alexcrichton
auto merge of #12387 : cmr/rust/ast-json, r=alexcrichton

See the commits