Thompson Sampling for Contextual Bandits with Linear Payoffs