util: simplify the interface of serviceFlagToStr()
Summary:
Don't take two redundant arguments in `serviceFlagToStr()`. As a side effect this fixes an issue introduced in https://github.com/bitcoin/bitcoin/pull/18165 due to which the GUI could print something like `UNKNOWN[1033] & UNKNOWN[1033] & UNKNOWN[2^10]` instead of `NETWORK & WITNESS`. util: dedup code in callers of serviceFlagToStr()
Backport of core PR19106.
Depends on D8518.
Test Plan:
ninja all check-all ./src/qt/bitcoin-qt -server
Check the service bits display correctly
./src/bitcoin-cli getnetworkinfo
Check the service bits display correctly
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D8519