Deviation inequalities for stochastic approximation by averaging