Thermodynamic and kinetic characterization of colloidal polymers of N-isopropylacrylamide and alkyl acrylic acids for optical pH sensing