H2S analyzers and CO2 analyzers for natural gas sweetening