Training Dynamics for Curriculum Learning: A Study on Monolingual and Cross-lingual NLU