[LOGBACK-1019] Added code to close the DatagramSocket

I am surprised to see there is no close method called on the DatagramSocket this may lead to a UDP leak.
Kindly let me know if there is anything wrong in my code.