Generalized photonuclear sum rule, resonance broadening and shadowing effects