A French court has jailed the ex-husband of Gisele Pelicot for 20 years over the drugging and mass rape of his wife, and found dozens of others guilty.