A comparative study of the thermodynamics of protonation of vinyl polymers containing amido and carboxylic groups as side substituents