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.