OFDNSResolver: Major refactor

This temporarily doesn't use the search domains anymore and makes CNAMEs
slightly more inefficient. The next commits will fix both.