Near-Optimal Quantum Algorithms for Computing (Coarse) Correlated Equilibria of General-Sum Games