Ontogenetic thermal tolerance and performance of ectotherms at variable temperatures