PALO ALTO, Calif. — Long before he became one of Donald Trump’s biggest donors and campaign surrogates, South African-born Elon Musk worked illegally in the United States as he launched his entrepreneurial career after ditching a graduate studies program in California, according to former business associates, court records and company documents obtained by The Washington Post.