Add initial IDN support

IDNs are not currently supported by the client, but punycode is. This
commit converts IDNs to punycode before attempting anything.