Coupling between proton binding and redox potential in electrochemically active macromolecules. The example of Polyaniline