CO2 capture and analysis system