Musk solidified his standing as the world’s richest person and turned Tesla into a $1 trillion company.