Theory of nonlinear optical properties of small metallic spheres