Optimality and equilibria in stochastic games