T cell differentiation in chronic infection and cancer: functional adaptation or exhaustion?