Sum rules and spectral measures of Schrödinger operators with L^2 potentials