Add a resolve() method.

The method implements Tor's DNS extension for SOCKSv5.  The new command code
0xf0 is used to instruct exit relays to conduct DNS resolution for the given
hostname.