The Scottish Prison Service has admitted the brutal death of inmate Allan, 30, in 2015 was unlawful after excessive force was used by officers.