Fix potential state desync in disconnectFromIrc()
Previously, disconnectFromIrc() would assume that if the socket was
in any state other than ConnectedState that it was disconnected and
send the socketDisconnected() signal. However, if the socket was
in a different state, such as ConnectingState, this caused the
corenetwork state and the socket state to become desynchronized.
This patch causes disconnectFromIrc() to close the socket and
start the socketCloseTimer in the event that the socket is in a
state other than UnconnectedState or ConnectedState.