Resonant structure of the outer Solar System