Avoid memory corruption while deleting the ModelStructure
Avoid memory corruption while deleting the ModelStructure

In ModelStructure ctor, during the qDeleteAll() the children were
removing themselves from the parent's list of children, making the
iterators used in qDeleteAll() invalid. So call qDeleteAll() on a
copy of the children list.

sandsmark/zanshin,kolab-groupware/zanshin,kolab-groupware/zanshin,kolab-groupware/zanshin,sandsmark/zanshin,sandsmark/zanshin