Language and the Development of Cognitive Flexibility: Implications for Theory of Mind