Tunisian court slaps ex-president with life sentence