Fix EventSource under rack.hijack servers by sharing more stream-related code with WebSocket.