COMETD-512 WebSocketTransport should close the connection when expiring.

When a message expires due to maxNetworkDelay, the connection
is now closed with message 'Expired'.
COMETD-513 - Client-side half-closed connections should discard server messages.

The implementation now uses a different WebSocket endpoint per
connection, so that an old endpoint can detect whether it should
discard messages (because they belong to a closed connection).
COMETD-511 - Ack extension may lose messages.

Fixed race in the new implementation, where a thread could read
the wrong batch number and send it in the /meta/connect response.