Syrian troops ousted Islamic State extremists Friday from Deir el-Zour, a major city in eastern Syria, while Iraqi forces retook Qaim, the group’s last big town across the border in Iraq, in simultaneous assaults that dealt further territorial losses to the retreating militants.