Replace a few usages of std::for_each with the nicer looking for(foo : bar) style loop.