A Theory on the Rise and Fall of Resistance in Civil Wars