Move std::filesystem directory iterators and operations from libstdc++fs.a to main libstdc++ library. These components have many dependencies on OS support, which is not available on all targets. Some additional autoconf checks and conditional compilation is needed to ensure the files will build for all targets. Previously this code was not compiled without --enable-libstdcxx-filesystem-ts but the C++17 components should be available for all hosted builds. The tests for these components no longer need to link to libstdc++fs.a, but are not expected to pass on all targets. To avoid numerous failures on targets which are not expected to pass the tests (due to missing OS functionality) leave the dg-require-filesystem-ts directives in place for now. This will ensure the tests only run for builds where the filesystem-ts library is built, which presumably means some level of OS support is present. Tested x86_64-linux (old/new string ABIs, 32/64 bit), x86_64-w64-mingw32. Committed to trunk.