Turkey achieved a milestone in its goals in Syria: It established a foothold in the heart of the country’s north after driving Islamic State militants away from its borders and seizing al-Bab, one of the extremist group’s major strongholds and a major supply route.