Ecological immunogenetics of life-history traits in a model amphibian