Safety-Aware Invariant Representations for Reinforcement Learning from Pixels