Memorization or Reasoning? Exploring the Idiom Understanding of LLMs