Controlling residual metal in carbide-derived carbons for acid gas removal