The evolution of mating strategies in flowering plants