Text this: Hallucinations in LLMs: a lifecycle-based survey of causes, detection, mitigation, and prevention