Send a message to stderr. I have an inkling one
of my programs is timing out because it's not responding
to server PINGs. This might tell me that. Useful anyway.
Needed to have wsclient structure passed to callbacks for references
to sockfd or other API functions that need it. (libwsclient_close)
Also, respond to close frames correctly. Right now, we just wait
on server to close TCP connection without a timeout.