Evolutionary history and the assembly of ecological communities