Modeling Intracluster Gas in Triaxial Dark Halos: An Analytic Approach