This essentially reverts e02ed1c255 and puts in a new fix, which makes `path::iterator` a true C++20 `bidirectional_iterator`, but downgrades it to an `input_iterator` in C++17. Fixes #37852. Differential Revision: https://reviews.llvm.org/D116489
e02ed1c255