The One Direction star has died aged 31.