This concludes backport of core#22937 [2g/2g]
https://github.com/bitcoin/bitcoin/pull/22937/commits/6544ea5035268025207d2402db2f7d90fde947a6
This commit disallows passing a std::string to fs::path, building on previous commits which removed all such calls. This is because the behavior of this constructor on windows will be more complicated and can mangle path strings after the transition from boost::filesystem to std::filesystem in core#20744 .
Depends on D10800