[backport#12916] Introduce BigEndian wrapper and use it for netaddress ports
Summary:
This is another small improvement taken from #10785.
Instead of manually converting from/to BE format in the CService serializer, provide a generic way in serialize.h to serialize BE data (only 16 bits for now).
This is a backport of Core PR12916
Test Plan:
ninja check check-functional
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D5799