Role of elasticity forces in thermodynamics of intercalation compounds: Self-consistent mean-field theory and Monte Carlo simulations