dns: improve response name parsing

Improve parsing of names with multiple pointers following each other.