DETERRENT: Detecting Trojans using Reinforcement Learning