Nonclassical correlations for quantum metrology in thermal equilibrium