High-resolution neutron scattering measurement of the dynamic structure factor of heavy water