Don't assume any change to the process is bad - check before closing.
Correctly set websocket-server-p, and don't mask server communication.

This follows the requirements in the spec.
Fix tests to handle extra argument to websocket-encode-frame.
Handle on-close for all varieties of websocket closings.

This brings the actual behavior in line with what the docs say it does.
Add extra assert in functional test, and increase sleep time for wss test.
Fix for on-close in websocket test
Add back in calling of websocket-close, this time more safely.

This needs to be done because when the connection is suddently killed,
the websocket would otherwise not be notified of being closed.