keep outgoing UDP packets from splitting with proper packet size calculation based on MTU and size of headers and some other small cleanups