Fix serve-stale bug when cache has no data
We recently fixed a bug where in some cases (when following an expired CNAME for example), named could return SERVFAIL if the target record is still valid (see #3678 (closed), and !7096 (merged)). We fixed this by considering non-stale RRsets as well during the stale lookup.
However, this triggered a new bug because some database lookups don't result in a final answer but something else, for example a delegation.
Closes #3950 (closed)
Edited by Matthijs Mekking