Regularity of stable solutions to semilinear elliptic equations on Riemannian models