Infrared divergence and twist-3 distribution amplitudes in QCD factorization for B→PP