Also introduce node::{ShouldPersistMempool,MempoolPath} helper functions
in node/mempool_persist_args.{h,cpp} which are used by non-kernel
DumpMempool callers to determine whether or not to automatically dump
the mempool and where to dump it to.
This is a partial backport of core#25487
https://github.com/bitcoin/bitcoin/pull/25487/commits/413f4bb52b72e082ad8716664ede48352b8e7e5a
Depends on D15716