Fixed parsing of DNS response packets having compressed names ending with pointer.
There were troubles parsing response packets which have compression of
QNAME/NAME field when only trailing part of the name (not the whole name)
is replaced with pointer to another part of the packet.
This commit fixes parsing of such packets.
Also I added checks to keep parsing only in bounds of the read part
of DNS response packet.
Approved-by: Gregory Nutt <gnutt@nuttx.org>