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

UDP socket leak happens 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 of 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
Merge pull request #1 from saich/socket-improvements

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