Added prevention of unclosed ice sockets

Added close for ice sockets when getting both TCP and UDP StreamConnectors if the sockets are not of MultiplexingSocket or MultiplexingDatagramSocket type. Closed possibly unclosed resources.