Stanford researchers have invented a lithium-ion battery that turns on and off depending on the temperature. The new technology could prevent battery fires that have plagued laptops, hoverboards and other electronic devices.