gresolv: Destroy query at the relevant place when parsing the response