cache kernel_info reply for protocol adaptation

WebSocket connections will not open until kernel_info is retrieved,
removing a race condition waiting for the reply to indicate adaptation,
which could result in a v5 message being sent to a v4 kernel.
The reply is cached, so that it need not be requested on each new connection.
add websocket workarounds for tornado 3

WebSocketHandler.get is new in tornado 4
Don't resend kernel info requests if a bad reply is received
Merge pull request #6765 from minrk/race-kernel-info

cache kernel_info reply for protocol adaptation