Area–heterogeneity tradeoff and the diversity of ecological communities