This is an extraction of filesystem related functions from util/system
into their own utility file.
The background of this commit is an ongoing effort to decouple the
libbitcoinkernel library from the ArgsManager defined in system.h.
Moving these functions out of system.h allows including them from a
separate source file without including the ArgsManager definitions from
system.h.
This is a partial backport of core#27254
https://github.com/bitcoin/bitcoin/pull/27254/commits/18fb36367a28819bd5ab402344802796a1248979
Depends on D16150