PoLLMgraph: Unraveling Hallucinations in Large Language Models via State Transition Dynamics