Though Musk now describes himself as the “first buddy” of the president-elect, their friendship hasn’t always been smooth.