Consequences of thermodynamic restraints on solvent and ion transfer during redox switching of electroactive polymers