A survey of more than 56,000 sun-like stars reveals that “superflares” that could play havoc with electronics on Earth may happen every 100 to 200 years and the last big one to hit us was in 1859