dispersive response theory with applications to QND measurement and spin squeezing