Density dependence of resonance broadening and shadowing effects in nuclear photoabsorption