Learning Efficient Modeling and Compensation for Thermal Behavior of Machine Tools