Habitat heterogeneity and niche structure of trees in two tropical rain forests