Antagonistic effects of intraspecific cooperation and interspecific competition on thermal performance