added handling for socket not being ready
added handling for socket not being ready

At some points, the code may try to send a message to the server even
though the server is not ready yet. To fix this, the sendMessage method of
the server API will now check to make sure that the socket is ready
before the message is sent. If the socket is not ready, sendMessage will
---stop drop and roll--- throw a new SocketNotReadyException that contains
the current state of the socket

Cardshifter/HTML-Client,Cardshifter/HTML-Client,SirPython/HTML-Client,SirPython/HTML-Client