net: compat.h related cleanup
Summary:
net: Drop unneeded Windows headers in compat.h
No interface from the mswsock.h header is used.
According to https://docs.microsoft.com/en-us/windows/win32/winsock/creating-a-basic-winsock-application
"The Winsock2.h header file internally includes core elements from
the Windows.h header file, so there is not usually an #include line
for the Windows.h header file in Winsock applications."
net: Drop unneeded headers when compat.h included
net: Add compat.h header for htonl function
This is a backport of core#20221
Test Plan:
ninja all check-all
Run windows builds on CI.
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D10993