Merge pull request #1137 from pah/fixes/1131-iterator-deprecation

Avoid inheritance from std::iterator