Moving-Target Defense for Detecting Coordinated Cyber-Physical Attacks in Power Grids