Resistance of polyaniline films as a function of electrochemical potential and the fabrication of polyaniline-based microelectronic devices