extra: docs, tests and new functionality for the extra::stats module
auto merge of #7518 : graydon/rust/stats-improvements, r=catamorphism