Pakistan has temporarily lifted a curfew in the Swat Valley to enable thousands of civilians to flee the fighting.