Static and Dynamic Techniques for Residual Stress Measurements in Microelectromechanical Systems