An eco-evolutionary framework for studying resilience and tipping points in ecosystems under stress