Fix compiler warnings about inefficient iteration
Fix compiler warnings about inefficient iteration

Apparently, std::pair based iteration on std::unordered_map needs
to copy the data together to form the std::pair, so iterating with
const std::pair<> & suggests an efficiency that isn't there.
For the first loop, there is actually a nice solution that avoids
copying the container as well.

KDE/dferry,KDE/dferry