Thompson Sampling and Approximate Inference