Don't enable serve-stale on duplicate queries
When checking if we should enable serve-stale, add an early out case when the result is an error signalling a duplicate query or a query that would be dropped.
There is no test for this fix, as I don't know how to trigger the code path with a system test. I tested the fix manually with a patched version of BIND, that sleeps for some time on the first call to ns_query_recurse
. Then dig
retries the query after a second, which is a duplicate.
Closes #2982 (closed)