how did the solar system form