Add websocket.Server to configure WebSocket server handler.
- Config.Header is additional headers to send, so you can use it
to send cookies or so.
To read cookies, you can use Conn.Request().Header.
- factor out Handshake.
You can set func to check origin, subprotocol etc.
Handler checks origin by default.
Fixesgolang/go#4198.
Fixesgolang/go#5178.
R=golang-dev, mikioh.mikioh, crobin
CC=golang-dev
https://golang.org/cl/8731044
Manual edits to README.
Moved from main Go repository, deleted Makefiles, ran gofix -r go1rename.
Tested with: go test code.google.com/p/go.net/...
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5574065