First-principles calculations of vibrational and thermodynamical properties of rare-earth diborides