Attacks on religious sites in southwestern Russia’s Dagestan region in June left more than 20 people dead, underscoring how the North Caucasus region continues to be a thorn in President Putin’s side, two-and-a-half decades after the first major test of his leadership came from the region.