Gradient-driven dynamics on Finsler manifolds: The Jacobi action-metric theorem and an application in ecology