Memorization in Language Models through the Lens of Intrinsic Dimension