A court in France has jailed the ex-husband of Gisele Pelicot over her drugging and mass rape in a landmark trial.