Refactor message transport packaging
Summary:
This PR factors out transport packaging logic from CConnman::PushMessage(). It's similar to #16202 (where we refactor deserialization). This allows implementing a new message transport protocol like BIP324.
Backport of core PR16562.
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, PiRK, jasonbcox
Reviewed By: #bitcoin_abc, PiRK, jasonbcox
Differential Revision: https://reviews.bitcoinabc.org/D8374