Asymptotic normality and optimality in nonsmooth stochastic approximation