Simulations of Coulomb systems confined by polarizable surfaces using periodic Green functions