Elon Musk's public support for Germany's far-right AfD party has stirred controversy ahead of the country's general election.