Re #7876. Correct to use array delete.
Re #7876. Move delete until after last use.

m_data is used within saveSettings(), so we'd better not delete it
until after that!
Re #7876. Delete right before new allocation.

The coverity scan complained that the deleted fitter could be used at
line 234 if all the if tests above it were false. Don't know if that
can happen, but let's be safe.
Re #7876. Remove unused method.

I don't think this method is used anywhere, which is a good thing as it
was returning a pointer to a temporary.
Re #7876. Refactor to not return pointers to temporaries.