Serialization improvements step 5 (blockencodings)
> This PR is probably the most involved change in the sequence of changes extracted from #10785.
>
> In order to implement the differential encoding of BIP152, this change changes VectorFormatter to permit a stateful sub-formatter, which is then used by DifferenceFormatter. A CustomUintFormatter is added as well to do the 48-bit serialization of short ids.
>
This is a backport of Core PR18112 [1/5]
https://github.com/bitcoin/bitcoin/pull/18112/commits/3ca574cef0b4423f21b2c3efd8f5c9f71d52f219