Convert internationalised domains to ASCII.
Implements RFC 3492, the same transform a browser applies before a DNS lookup, so an IDN and its xn-- form map to each other.