Ergodicity and Stability Theorems for a Class of Stochastic Equations and Their Applications