Riemann solvers with non-ideal thermodynamics: exact, approximate, and machine learning solutions