Flexible polymer electrode using self-assembled porous polyaniline