SPICE: Self-Play In Corpus Environments Improves Reasoning