The deal combines two of Musk’s multiple portfolio companies, which also include automaker Tesla and SpaceX.