For years, solar panel owners in countries across the world received generous payments for exporting electricity they did not use back to the grid.