For years, engineers have shuffled between Tesla and SpaceX, and the companies have worked on major projects together.