Classical Statistical Mechanics with Nested Sampling