Do not convert ISC_R_NOSPACE to DNS_R_SERVFAIL too early
The parsing loop needs to process ISC_R_NOSPACE to properly size the buffer. If result is still ISC_R_NOSPACE at the end of the parsing loop set result to DNS_R_SERVFAIL.
(cherry picked from commit 08f1cba0)
Closes #3021 (closed)