ENH: Prevent continuous changing of connector node state while waiting for connection

igtlcon->WaitForConnection() does not delete the socket, just closes it, so (igtlcon->Socket.IsNotNull()) is always true.
This causes a STATE_WAIT_CONNECTED and STATE_WAIT_CONNECTION state change at each reconnect attempt, which results unnecessary Modified event invocations (that causes for example lots of failed command sending attempts in PlusRemote).

Instead, (igtlcon->Socket->GetConnected()) should be called to see if a client/server is connected successfully.

Tested on Windows in both client and server modes.
Merge pull request #43 from lassoan/fix_state_transitions_while_watiting_for_connection

ENH: Prevent continuous changing of connector node state while waiting for connection