Correctly seek to the beginning of packets being resent, simplify Socket::getBoundAddress, and some minor tidying.