Phase transitions in QCD and string theory