fix c10::detail::integer_iterator for C++17 (#90174)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/pytorch/pytorch/pull/90174).
* __->__ #90174
fix c10::detail::integer_iterator for C++17
Summary: std::iterator is deprecated.
Test Plan: Rely on CI.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/90174
Approved by: https://github.com/clee2000, https://github.com/malfet