Soldiers in Benin appeared on state television to say they had toppled President Patrice Talon and taken power.