There is a significant link between higher temperatures and lower school achievement, says a US study.