Redox and acid-base coupling in ultrathin polyelectrolyte films.