dns plugin: Use threads rather than two processes and a pipe.