bug fixes and features for autobahn test suite to run

- make "Upgrade: websocket" header check case insensitive
- implemented close handshake
- echo server now has a perfect echo, in line with autobahn's expectations