Integrating insurgent groups into democratic politics can strengthen the legitimacy of democracy itself