Peculiarities of anharmonic lattice dynamics and thermodynamics of alkaline-earth metals