Expand the testing guide to cover optimizations, benchmarks and how to
be more precise about what's being benchmarked.

Also, reorganise the layout a bit, to put examples directly in their
sections.
auto merge of #12119 : huonw/rust/guide-testing, r=brson

be more precise about what's being benchmarked.

Also, reorganise the layout a bit, to put examples directly in their
sections.