QCD factorization in B→πK, ππ decays and extraction of Wolfenstein parameters