Former One Direction singer Liam Payne's medical cause of death has been revealed months after he died aged 31.