socket.io middleware for parsing cookies.