A general minimum principle for competing populations: some ecological and evolutionary consequences