Structure, phase transitions and molecular dynamics of [C(NH2)3]3[M2I9], M = Sb, Bi