Thousands of supporters of former dictator Muammar Gaddafi are still being held in Libyan prisons, with many of them tortured - according to a UN report.