Investigations of electrochemical polymerization processes of thin poly(pyrrole) films and its application to anion sensor based on surface plasmon resonance