For years, Americans have been blanketing their homes with scads of solar panels. Now, they’re adding a growing number of batteries to store that electricity and protect against blackouts.