Local and nonlocal surface nonlinearities for surface optical second-harmonic generation