iter: add fold, sum and product
auto merge of #6544 : thestinger/rust/new_iter, r=nikomatsakis