test: Add test case for ReplaceAll() function
refactor: Drop boost/algorithm/string/replace.hpp dependency
This is a backport of core#25803
with a std::move removed change (see comment by MarcoFalke https://github.com/bitcoin/bitcoin/pull/25803/commits/fea75ad3caa29972db32d3ce7e0fe125ec77a0eb#r946498588)