A massive attack on Ukraine's energy infrastructure by Russia has cut power to more than one million people across the country.