Accurate multipole moments for H2 and D2 including the effects of electron correlation and molecular vibration and rotation