Non-rigid symmetry groups of molecular trimers and three-rotor molecules