With a tentative agreement to be purchased by its sister company, Tesla Motors, SolarCity is going all in on a strategy that some analysts say is ahead of its time: pairing solar systems with the automaker’s energy-storage batteries.