Try to fix MinGW compilation (EXTERN to nop)

This regression comes from Visual Studio patches.
Avoid overriding of bswap_32 because bswap_16 is undefined
Avoid to shadow 'boolean' on weird platform (Windows)
Avoid empty  _modbus_rtu_ioctl_rts when no HAVE_DECL_TIOCM_RTS
Use a unsigned long for ioctlsocket on Windows
Don't use reserved word 'byte' on Windows!
Rename 'socket' variables to 's' to avoid warning on Windows