Luminescence probe and voltammetry study of ion transport during redox switching of poly(pyrrole) thin films