Remove some useless code
Ensure that the websocket is cleaned up after the application is done.

If `prevent_wsgi_call` is True, then it is up to another power to close
the websocket at the end of the request.
Don't close the websocket if an exception is raised.

Delegate the responsibility of closing the websocket at the end of the
request to a higher layer. By default the WebSocketHandler will now
manage this.

This allows wrapping protocols to send close frames and the like to the
endpoint (assuming the socket is still viable).
Remove unused import