Elasticity and dislocation anelasticity of crystals