A large deviation theory analysis of Bayesian tree search