[cppmyth] TcpSocket: write accessors inline

GetErrNo , IsConnected
[cppmyth] Fix crash when trying disconnect

Start the disconnection procedure only for valid socket.