A massive object may have disrupted the Solar System and affected the orbits of the giant planets 4 billion years ago