Elon Musk, who was once skeptical of former President Donald J. Trump’s campaign, has come to embrace it.