Thousands of people have been fleeing their homes ahead of a curfew in the Syrian city of Aleppo.