Agnostic Reinforcement Learning: Foundations and Algorithms