Fixes the socket leak, and the crash on DNS error.

UDP socket leak happens as a dgam socket is being created on each `flush`,
but the connection is not closed. This leads to multiple unused dgrams,
bound to different local UDP ports.

On DNS errors, an `error` event is thrown, which if not handled, an
error occurs and leads to process termination. Adding callback on
`send` is not sufficient to handle DNS errors. For more details, look
at https://github.com/joyent/node/issues/4846