Dynamic Density Response of Trapped Interacting Quantum Gases