Use the fact that the database returns the longest matching part of the requested name to find the required NSEC3 record. If there are multiple versions present in the database we may have to search further.
Closes #4460
Backport of MR !9436
Merge branch 'backport-4460-auth-nsec3-many-labels-9.18' into 'bind-9.18'
See merge request isc-projects/bind9!9439