Entanglement and classical fluctuations at finite-temperature critical points