Factorization and soft-gluon divergences in isolated-photon cross sections