Liam Payne's final hours have been detailed by a judge as five people are charged over his death.