Add Bind method for creating a socket and bind it to a port.

Also added automatic closing of socket on destruction of Socket object.