Expand documentation of WebSocketHandler.check_origin.

Document the potential problems that arise with websockets and
self-signed certificates.
Merge branch 'branch4.0'