A court in Benin on Thursday sentenced two former allies of President Patrice Talon to 20 years in jail on charges of "conspiring against the authority of the state".