Generic Rotating-Frame-Based Approach to Chaos Generation in Nonlinear Micro- and Nanoelectromechanical System Resonators.