Charge Exchange X-Ray Emission due to Highly Charged Ion Collisions with H, He, and H2: Line Ratios for Heliospheric and Interstellar Applications