[mdns] fix wrong NSEC answer for unique RRs
Existing MdnsRecordRepositiry#getReply will send a NSEC RR in the reply
when 1) a query for a unique RR is not found or 2) any unique name which is
included in the answer sections. The second one is not aligned with the
spec:
```
On receipt of a question for a particular name, rrtype, and rrclass,
for which a responder does have one or more unique answers, the
responder MAY also include an NSEC record in the Additional Record
Section indicating the nonexistence of other rrtypes for that name
and rrclass.
```
This commit fixes the issue in 2) by checking that all unique records of
the name are included in the answers before adding a NSEC record.
Bug: 265095929
Test: atest FrameworksNetTests
Change-Id: I0531fbccf98e69a50bb8a45e529caaed3ad80b59
2 files changed