SpaceX gained for a fourth straight day, cementing the company’s place among the world’s most valuable stocks after it surpassed Amazon.com Inc.