Discovering and Removing Exogenous State Variables and Rewards for Reinforcement Learning