Tidy up PortMapper::send_packet().

This patch fixes a socket leak in send_packet(), and reworks the logic
to make it easier to follow.

Signed-off-by: Joe Stringer <joe@wand.net.nz>