iterator: Add `IteratorUtil::max_by/min_by` method
auto merge of #7414 : gifnksm/rust/max_by, r=catamorphism

`max_by` method returns the element that gives the maximum value from the specfied function.
`max_by`/`min_by` are convenient when you want to get the value which has greatest/smallest scores.

Inspired by [ruby's Enumerable module](http://ruby-doc.org/core-2.0/Enumerable.html).