A minimax and asymptotically optimal algorithm for stochastic bandits