Elon Musk has appeared to endorse a message about race-based emigration from his native South Africa, after President Donald Trump threatened the country over new land expropriation laws.