Batteries are becoming larger, cheaper, and more versatile, allowing them to support electric vehicles and an electric grid with a growing share of wind and solar power.