Use for_each in map Extend and FromIterator
Use for_each in map Extend and FromIterator

Using `for_each` allows internal iteration, which can have better
performance for some iterators. For instance, `Chain` and `FlatMap` have
to check their state every time `next()` is called, but when folding
they can just forward to their inner iterators.

rust-lang/hashbrown,rust-lang/hashbrown