UDP refactor: #close, #connected and #with_connection
UDP refactor: #close, #connected and #with_connection

Remove code in #close: UDP has no close method.

#connected? returns a boolean: true if socket exists, false if nil.
Protect with mutex.

DRY rescues in #with_connection and set @socket to nil if it fails.

riemann/riemann-ruby-client,aphyr/riemann-ruby-client