[This is an alternative approach to #9366]
The bswap_XX functions are sometimes provided by external libraries (protobuf) and sometimes not. To avoid inconsistency and relying on include order, the idea is to move these into a dedicated namespace (Bitcoin). Since they are declared as macros by e.g. protobuf, they are #undefd as well.
The one caveat with this approach is when someone would include compat/byteswap.h, and then include protobuf's port.h (in that order). In this case, the macro would be redefined and Bitcoin::bswap_XX would result in a compilation error.