Stochastic Communities: A Mathematical Theory of Biodiversity