Add FORMATTER_METHODS, similar to SERIALIZE_METHODS, but for formatters
Summary:
PR description:
This is the next piece of the puzzle from #10785. It includes:
The FORMATTER_METHODS macro, similar to SERIALIZE_METHODS, for defining a formatter with a unified serialization/deserialization implementation. Updating compression.h to consist of 3 formatters, rather than old-style wrappers (ScriptCompression, AmountCompression, TxOutCompression).
This is a backport of Core PR17957 [1/2]
https://github.com/bitcoin/bitcoin/pull/17957/commits/ca34c5cba5fbb9b046b074a234f06ecf6ed5d610
Depends on D8629
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D8631