Viscosity solutions of second order equations in a separable Hilbert space and applications to stochastic optimal control