The SEC and Elon Musk agreed to settle a lawsuit filed by the regulator last year against the world's richest person.