Integrating ecology into macroevolutionary research