The death by suicide of a 21-year-old university student in an overcrowded mental health unit that wasn't fit for purpose was preventable, a coroner has found.