Makes sure that Socket instances which are discarded because they are only added after the corresponding ICE Agent has moved away from the WAITING or RUNNING state are closed. This prevents a file descriptor leak, since Socket instances which are not closed (even after they are garbage collected) leave behind sockets in state CLOSE_WAIT.