A regulatory dispute in the US between the Securities and Exchange Commission and Tesla over CEO Elon Musk's postings on Twitter has been resolved.