Kramers–Kronig Relations and Sum Rules in Nonlinear Optical Spectroscopy