refactor: remove use of boost::algorithm::replace_first
Summary:
this trivial PR substitutes the (only) use of boost::algorithm::replace_first by a direct implementation.
This is a backport of core#20067
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D13241