Heterogeneity and Selection in Contests