how the solar system was formed and its components