Functional renormalization group of the nonlinear sigma model and the O(N) universality class