Fix memory leak when overwriting a property settings object.

The previous one must be deleted first.
Refs #7819
Fix small mem leak in Stitch1D with validator not being deleted.

Refs #7819
Fix various small leaks in UI layer.

Refs #7819
Initialize CompositeFunction base class properly.

Refs #7819
Remove custom defines of __declspec in API & TableWorkspace

Not strictly related to this ticket but there was no reason for this to
be duplicated.
Refs #7819
Merge branch 'bugfix/7819_fix_memory_leaks' into develop