Quantification of ion confinement and desolvation in nanoporous carbon supercapacitors with modelling and in situ X-ray scattering