Confinement and chiral symmetry breaking in CPn−1 models with quarks