[performance] look up address resolve requests in a QHash

This change does not affect normal performance but it guards
against bad performance when there are many resolve requests.

Thanks to Matthew Vogt for the idea.