Refactor FormatStateMessage into ValidationState
Summary:
Partial backport 1/3 of core PR17399:
https://github.com/bitcoin/bitcoin/pull/17399/commits/0aed17ef2892478c28cd660e53223c6dd1dc0187
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, majcosta
Reviewed By: #bitcoin_abc, majcosta
Differential Revision: https://reviews.bitcoinabc.org/D8326