pdns-recursor: properly handle exceptions thrown from lua-recursor4
directResolve function is used by lua-recursor4 in various callbacks. As
a result an exception thrown from this function is caught in generic
exception handlers at the end of startDoResolve (pdns_recursor).
Specifically, ImmediateServFailException is caught in the catch-all
exception handler, which obscures the origin of the error.
This commit adds handling of all exceptions inside directResolve and
converts them to error code (-1). This way, an exception in this
function is handled properly in startDoResolve and ServFail is sent
downstream.
To clarify, in case of exception the return DNSRecord vector is cleared
to make sure that old behavior is preserved, when in case of exception
the vector was not referenced in any way.