Differential Calculus in Riesz Spaces and Applications to g-Calculus