Phase selection and intermittency of exciton-polariton condensates in one-dimensional periodic structures