Theory of turbulent plasma heating by anomalous absorption of magnetosonic waves