Molecular properties from conformational ensembles. 1. Dipole moments of molecules with multiple internal rotations.