Convert LimitedString to formatter
Summary:
This is a backport of Core PR19032 [3/4]
https://github.com/bitcoin/bitcoin/pull/19032/commits/92beff15d3ae2646c00bd78146d7592a7097ce9c
Depends on D9245
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D9246