Effect of Common Impurities on the Phase Behavior of Carbon-Dioxide-Rich Systems: Minimizing the Risk of Hydrate Formation and Two-Phase Flow