websocketproxy: fix and add test for subprotocols