Follow W3C spec for constructor's `protocols` argument

This is a copy of #323, but with tests and with an old TODO removed. The tests are broken by the first commit in order to show that the second commit fixes them.

see http://www.w3.org/TR/websockets/#the-websocket-interface

resolves #323
resolves #290
resolves #298

see #227