Early Solar System instability triggered by dispersal of the gaseous disk