Offshore wind and solar farms are racing ahead, but the grids they feed still struggle with a basic problem: how to hold on to surplus power for the hours when the breeze drops and the sky goes dark.