On the Distribution of Genetic Variation in Ecological Communities