Moment of inertia and quadrupole response function of a trapped superfluid