chore: fix two usages of std::iterator (deprecated)
This trait has been deprecated in C++17, with users instructed to
migrate to defining each associated type when implementing an iterator.
This quiets the _GLIBCXX17_DEPRECATED warnings when compiling the
project on a sufficiently new gcc.
This follows on from previous efforts in
8b8a96d (#45198).
References: https://github.com/ceph/ceph/pull/45198
References: https://www.fluentcpp.com/2018/05/08/std-iterator-deprecated/
Signed-off-by: Paul Stemmet <github@luxolus.com>