Ukraine will be loaned tens of billions to rebuild its war-shattered power grid, about half of which has been destroyed during the war with Russia.