SpaceX founder Elon Musk has said his Starship rocket will head to Mars by the end of next year, as the company investigates several recent explosions in flight tests.