This allows using hostname lookups for the -proxy and -onion parameters in addition to raw IP addresses in the conf file or on the command line, in the same way and using the same -dns control switch that -addnode, -connect, and -seednode already use.
This was as simple as moving the the initialization of fNameLookup to earlier in the file, then using Lookup() instead of LookupNumeric() for -proxy and -onion.
Note: There are no documentation changes reflecting this in this pull request.
Also, -torcontrol is not affected, as it currently uses a utility function in libevent2 that only parses numeric IP addresses, and it wasn't clear what the best way was to reimplement this.