Electromagnetic Interference Attacks On Cyber-Physical Systems: Theory, Demonstration, And Defense