Regret Bounds for Learning State Representations in Reinforcement Learning