A Libyan court has sentenced Saif al-Islam Gaddafi to death over war crimes linked to the 2011 revolution in which is late father Col Muammar Gaddafi was deposed.